hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kalnichevski, Oleg" <oleg.kalnichev...@bearingpoint.com>
Subject RE: NTLM Auth Code Snippet
Date Wed, 13 Aug 2003 17:09:18 GMT
I took a look at the wire log. I can see no wrong in what HttpClient is doing. I also ran
a few NTLM authentication tests against IIS server. I am confident that NTLM logic is all
right. There's of course a chance (very slim, though, I have to say) that there's a bug in
HttpClient that only shows up when NTLM proxy authentication is being used, but so far I see
no evidence of that. I have no other choice but to suggest one more time that there's something
wrong with the credentials that you have been using to authenticate with the proxy.


-----Original Message-----
From: Rowe, David (CAG-CC MIS) [mailto:David.Rowe2@conagrafoods.com]
Sent: Wednesday, August 13, 2003 16:30
To: Commons HttpClient Project; olegk@apache.org
Subject: RE: NTLM Auth Code Snippet

Attached is a wire-log, from a test run this morning, fresh build off HEAD. (Still having
problems getting Branches in Eclipse)


-----Original Message-----
From: Oleg Kalnichevski [mailto:olegk@apache.org]
Sent: Tuesday, August 12, 2003 4:31 PM
To: Commons HttpClient Project
Subject: Re: NTLM Auth Code Snippet

As far as I can tell the code looks all right. My only guess was that
the parameters to NTCredentials constructor might have been messed up,
but that does not seem to be the case.

I just tested the latest snapshot of 2.0 branch and HEAD against Squid
proxy using Basic authentication scheme. No surprises there.
Unfortunately I cannot test HTTP communication via a proxy with NTLM
authentication as I do not have a single one at my disposal (I tried to
configure Squid to use NTLM instead of Basic, but to no avail). I know
HttpClient has been reported to work fine with NTLM proxies on more than
one occasion. So, I would still like to kindly ask you to double-check
the credentials you have been used to authenticate with the proxy. If
you are 100% sure the credentials are fine, send us the complete wire &
debug log. If you happen to have access to the proxy server in question
it would also be worthwhile checking the server logs to see if there are
any clues as to why the authentication has been refused


On Tue, 2003-08-12 at 23:00, Rowe, David (CAG-CC MIS) wrote:
> public class Authentication
> {
>     public Authentication() { }
>     public static void main(String[] args) throws Exception 
>     {
> 	System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog");

> 	System.setProperty("org.apache.commons.logging.simplelog.log.httpclient.wire", "debug");

> 	System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient",
>       HttpClient client = new HttpClient();
> 	client.getHostConfiguration().setProxy("[our proxy]", 80);
>       client.getState().setProxyCredentials(null,null,
>       	new NTCredentials("[user name]", "[password]", "[our proxy]", "[domain]")
>       );
>       GetMethod get = new GetMethod("http://www.yahoo.com");
>       get.setDoAuthentication( true );
> 	int status = client.executeMethod( get );
> 	System.out.println(status + "\n" + get.getResponseBodyAsString());
> 	get.releaseConnection();
>     }
> }
> Supposedly this should Authenticate through the proxy, and output Yahoo!'s website.
> If you can see anything that is needed please respond...
> David Rowe
> ConAgra Foods, Inc.
> Web Application Development - Intern
> 7350 World Communications Drive
> Omaha, NE  68122
> Phone: (402) 998-2722
> David.Rowe2@conagrafoods.com
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org

To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org

View raw message