Matt Carless [http://community.jboss.org/people/mnccouk] created the discussion

"Re: SSL calls thru a proxy with authentication?"

To view the discussion, visit: http://community.jboss.org/message/567352#567352

--------------------------------------------------------------
The above post doesn't work through SSL because the headers get encrypted. 
However after upgrading the webservice stack(included in the above post), the 
Authenticator function works.

So, add an authenticator

import java.net.PasswordAuthentication;

public class ProxyAuthenticator extends java.net.Authenticator{

      private String user, password;  
       
         public ProxyAuthenticator(String user, String password) {  
             this.user = user;  
             this.password = password;  
         }  
       
         protected PasswordAuthentication getPasswordAuthentication() {  
             return new PasswordAuthentication(user, password.toCharArray());  
         }  
}

Then set the user name and password in your app, it will be applied to your JRE 
session
Authenticator.setDefault(new ProxyAuthenticator("user", "pass" ));

and it now works through SSL
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/567352#567352]

Start a new discussion in JBoss Remoting at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2050]

_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to