axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sami...@apache.org
Subject svn commit: r492110 - /webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java
Date Wed, 03 Jan 2007 11:33:20 GMT
Author: saminda
Date: Wed Jan  3 03:33:16 2007
New Revision: 492110

URL: http://svn.apache.org/viewvc?view=rev&rev=492110
Log:
Fix for JIRA AXIS2-1929 Setting right credentials when NTLM is present with no host is given


Modified:
    webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java

Modified: webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java?view=diff&rev=492110&r1=492109&r2=492110
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java
(original)
+++ webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java
Wed Jan  3 03:33:16 2007
@@ -371,9 +371,16 @@
                     }
                     agent.getState().setCredentials(new AuthScope(host, port, realm), creds);
                 } else {
-                    /*Credentials only for Digest and Basic Authentication*/
-                    creds = new UsernamePasswordCredentials(username, password);
-                    agent.getState().setCredentials(new AuthScope(AuthScope.ANY), creds);
+                    if (domain != null) {
+                        /*Credentials for NTLM Authentication when host is ANY_HOST*/
+                        creds = new NTCredentials(username, password, AuthScope.ANY_HOST,
domain);
+                        agent.getState().setCredentials(
+                                new AuthScope(AuthScope.ANY_HOST, port, realm), creds);
+                    } else {
+                        /*Credentials only for Digest and Basic Authentication*/
+                        creds = new UsernamePasswordCredentials(username, password);
+                        agent.getState().setCredentials(new AuthScope(AuthScope.ANY), creds);
+                    }
                 }
 
                 /* Customizing the priority Order */



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message