You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Russell, Brian" <Br...@mottmac.com> on 2004/03/22 12:09:07 UTC

NTLM credentials.

Hi,

I am attempting to use the httpClient component to authenticate on a
proxy which uses NTLM authentication.

I have managed to use it successfully, but only when I explicitly
provide the data for the NTCredentials for the
HttpClient.getState().setProxyCredentials(). 

In JDK 1.4.2, if I use the java.net.URLConnection, it will authenticate
automatically, without me having to determine the users credentials.

Is there some way that I can use httpClient to automatically pick up the
data required for it's NTLM authentication? Or, alternatively, is there
someway to determine the required data for the NTCredentials to pass to
setProxyCredentials()?

Any help would be appreciated.


Brian.

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


Re: NTLM credentials.

Posted by Roland Weber <RO...@de.ibm.com>.
Hello Brian,

JDK for Windows uses Windows specific code to get the
user's login credentials. HttpClient does not use Windows
specific code, hence you're out of luck.
You could analyse what the JDK does and replicate that
in your application. But I guess you'd have to write native
code to access the Windows API.

cheers,
  Roland





"Russell, Brian" <Br...@mottmac.com>
22.03.2004 12:09
Please respond to "Commons HttpClient Project"
 
        To:     <co...@jakarta.apache.org>
        cc: 
        Subject:        NTLM credentials.


Hi,

I am attempting to use the httpClient component to authenticate on a
proxy which uses NTLM authentication.

I have managed to use it successfully, but only when I explicitly
provide the data for the NTCredentials for the
HttpClient.getState().setProxyCredentials(). 

In JDK 1.4.2, if I use the java.net.URLConnection, it will authenticate
automatically, without me having to determine the users credentials.

Is there some way that I can use httpClient to automatically pick up the
data required for it's NTLM authentication? Or, alternatively, is there
someway to determine the required data for the NTCredentials to pass to
setProxyCredentials()?

Any help would be appreciated.


Brian.

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