You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2006/06/02 09:25:29 UTC
svn commit: r411078 -
/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AbstractHTTPSender.java
Author: saminda
Date: Fri Jun 2 00:25:29 2006
New Revision: 411078
URL: http://svn.apache.org/viewvc?rev=411078&view=rev
Log:
Applied the patch by Jeff. Fixing a bug in NTLM authentication scheme.
Modified:
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AbstractHTTPSender.java
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AbstractHTTPSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AbstractHTTPSender.java?rev=411078&r1=411077&r2=411078&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AbstractHTTPSender.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AbstractHTTPSender.java Fri Jun 2 00:25:29 2006
@@ -308,9 +308,24 @@
HttpTransportProperties.BasicAuthentication basicAuthentication =
(HttpTransportProperties.BasicAuthentication) msgCtx
.getProperty(HTTPConstants.BASIC_AUTHENTICATION);
- Credentials defaultCredentials = new UsernamePasswordCredentials(
- basicAuthentication.getUsername(),
- basicAuthentication.getPassword());
+ Credentials defaultCredentials = null;
+ if (basicAuthentication.getRealm() == null) {
+ defaultCredentials = new UsernamePasswordCredentials(
+ basicAuthentication.getUsername(),
+ basicAuthentication.getPassword());
+ } else {
+ defaultCredentials = new NTCredentials(
+ basicAuthentication.getUsername(),
+ basicAuthentication.getPassword(),
+ basicAuthentication.getHost(),
+ basicAuthentication.getRealm());
+ agent.getState().setCredentials(new AuthScope(
+ basicAuthentication.getHost(),
+ basicAuthentication.getPort(),
+ null), defaultCredentials);
+
+ return;
+ }
if (basicAuthentication.getPort() == -1 ||
basicAuthentication.getHost() == null) {
agent.getState().setCredentials(AuthScope.ANY, defaultCredentials);
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org