hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Transparent Ntlm authentication
Date Mon, 30 Dec 2013 11:06:03 GMT
On Mon, 2013-12-30 at 05:51 -0500, Rob Goodberry wrote:
> Hey there,
> 
> I am trying to send http requests to the sharepoint site at our work. Using
> Javascript everything automatically worked. When I first tried to use Java
> I learned our Sharepoint uses NTLM authentication as I got a 401 response.
> I was able to get ntlm authentication to work using both the default and
> jcifs ntlmengine from the examples here. However, I do not want my users to
> have to enter their sharepoint password as it is the same as their windows
> credentials.
> 
> After some further research I have found that the java.net.urlconnection
> implementation automatically attempts to provide the currently logged in
> Windows user credentials (since 1.5_08). Is there some way to emulate the
> same behaviour with HttpClient? Has anyone else come across this and been
> able to find the part of Suns code that provides that functionality? I want
> to use HttpClient instead of URLConnection but I just haven't been able to
> figure it out yet!
> 
> Funnily enough in my search I am finding endless amounts of people with the
> exact opposite problem, trying to provide specific credentials but
> urlconnection is automatically using their windows credentials and people
> advise them to use HttpClient instead because it doesn't do that by
> default. If only that was my problem!
> 
> Thanks,
> Rob

Hi Rob

As of version 4.4 HttpClient is likely to be able to authenticate
transparently with NTLM when running on a Windows OS

For the time being you can checkout and build the source of Windows
specific auth schemes from here:

http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/httpclient-win/ 

Please note they are still considered experimental and as such are not
supported. However, I would be very interested to know if you succeed in
getting them work. 

Cheers

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message