[jboss-user] [JBoss Remoting] - Re: SSL calls thru a proxy with authentication?

Matt Carless do-not-reply at jboss.com
Fri Sep 24 09:27:39 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/563545#563545

--------------------------------------------------------------
I would also like to know how to connect jboss through a proxy that requires authentication.
I have tried

java.net.Authenticator.setDefault(new ProxyAuthenticator("user", "pass"));
           System.setProperty("http.proxySet", "true");
           System.setProperty("http.proxyHost", "proxy");  
           System.setProperty("http.proxyPort", "8080");

with  this 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());  
         }  
}

and I receoive a HTTP 407 proxyauthentication error.

The reason I need to do this is to access an external webservice from within a jboss app.
--------------------------------------------------------------

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

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/20100924/68ab2191/attachment-0001.html 


More information about the jboss-user mailing list