[jboss-user] [JBoss Remoting] - Re: SSL calls thru a proxy with authentication?
Matt Carless
do-not-reply at jboss.com
Wed Oct 20 05:16:11 EDT 2010
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]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20101020/e64a7ac5/attachment-0001.html
More information about the jboss-user
mailing list