Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 24093 invoked from network); 10 Aug 2006 02:08:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Aug 2006 02:08:33 -0000 Received: (qmail 63808 invoked by uid 500); 10 Aug 2006 02:08:32 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 63693 invoked by uid 500); 10 Aug 2006 02:08:31 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 63681 invoked by uid 500); 10 Aug 2006 02:08:31 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 63677 invoked by uid 99); 10 Aug 2006 02:08:31 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Aug 2006 19:08:31 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Aug 2006 19:08:30 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 681941A981A; Wed, 9 Aug 2006 19:08:10 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r430209 - /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AbstractHTTPSender.java Date: Thu, 10 Aug 2006 02:08:10 -0000 To: axis2-cvs@ws.apache.org From: dims@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20060810020810.681941A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: dims Date: Wed Aug 9 19:08:09 2006 New Revision: 430209 URL: http://svn.apache.org/viewvc?rev=430209&view=rev Log: set a credential provider and set the ANY_SCHEME flag. (trying to get NTLM/BASIC working with HTTPS) 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=430209&r1=430208&r2=430209&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 Wed Aug 9 19:08:09 2006 @@ -40,6 +40,9 @@ import org.apache.commons.httpclient.NameValuePair; import org.apache.commons.httpclient.UsernamePasswordCredentials; import org.apache.commons.httpclient.auth.AuthScope; +import org.apache.commons.httpclient.auth.CredentialsProvider; +import org.apache.commons.httpclient.auth.AuthScheme; +import org.apache.commons.httpclient.auth.CredentialsNotAvailableException; import org.apache.commons.httpclient.methods.RequestEntity; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -353,13 +356,24 @@ agent.getState().setCredentials(new AuthScope( ntlmAuthentication.getHost(), ntlmAuthentication.getPort(), - null), defaultCredentials); + AuthScope.ANY_REALM, + AuthScope.ANY_SCHEME), defaultCredentials); + setCredentialsProvider(agent, defaultCredentials); return true; } return false; } + private void setCredentialsProvider(HttpClient agent, final Credentials credentials) { + agent.getParams().setParameter(CredentialsProvider.PROVIDER, new CredentialsProvider() { + public Credentials getCredentials(AuthScheme authScheme, String string, int i, boolean b) + throws CredentialsNotAvailableException { + return credentials; + } + }); + } + private void configServerPreemtiveAuthenticaiton(HttpClient agent, MessageContext msgCtx, HostConfiguration config, @@ -385,7 +399,6 @@ basicAuthentication.getPassword()); if (basicAuthentication.getPort() == -1 || basicAuthentication.getHost() == null) { - agent.getState() .setCredentials(AuthScope.ANY, defaultCredentials); } else { @@ -393,16 +406,19 @@ agent.getState().setCredentials(new AuthScope( basicAuthentication.getHost(), basicAuthentication.getPort(), - AuthScope.ANY_REALM), defaultCredentials); + AuthScope.ANY_REALM, + AuthScope.ANY_SCHEME), defaultCredentials); } else { agent.getState().setCredentials(new AuthScope( basicAuthentication.getHost(), basicAuthentication.getPort(), - basicAuthentication.getRealm()), + basicAuthentication.getRealm(), + AuthScope.ANY_SCHEME), defaultCredentials); } } + setCredentialsProvider(agent, defaultCredentials); } --------------------------------------------------------------------- To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org For additional commands, e-mail: axis-cvs-help@ws.apache.org