hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clemens Wyss DEV <clemens...@mysign.ch>
Subject AW: HttpClient & NTLM-auth
Date Fri, 10 Jun 2016 13:29:53 GMT
Thanks for the reply. I am not on Windows. Also I have meanwhile come to the conclusion, that
the WS endpoint wants to do SPNEGO....

> CredentialsProvider (started on 3/21/2016)
>Proxy Authentication Strategy (started on 4/7/2016)
>Proxy with digest authentication (started on 4/11/2016)
I will check them 

-Clemens

-----Urspr√ľngliche Nachricht-----
Von: Mark A. Claassen [mailto:MClaassen@ocie.net] 
Gesendet: Donnerstag, 9. Juni 2016 20:40
An: HttpClient User Discussion
Betreff: RE: HttpClient & NTLM-auth

I am not sure what you have tried.  If you are on Windows, you can try using the native providers.
 I think these are officially unsupported (probably because constantly testing this would
require too much money / effort), but they work.

HttpClientBuilder builder;
<snip>
			Registry<AuthSchemeProvider> authSchemeRegistry = RegistryBuilder.<AuthSchemeProvider>create()
					.register(AuthSchemes.NTLM, new WindowsNTLMSchemeFactory(null))
					.register(AuthSchemes.SPNEGO, new WindowsNegotiateSchemeFactory(null))
					.register(AuthSchemes.DIGEST, new DigestSchemeFactory())
					.register(AuthSchemes.BASIC, new BasicSchemeFactory())
					.build();
<snip>
builder.setDefaultAuthSchemeRegistry(authSchemeRegistry);


If you don't want to use them, you can subclass a CredentialsProvider.  However, if you are
on Windows, I would try the canned versions at first and see if you can get it to work.


(If you create your own CredentialsProvider)
	builder.setDefaultCredentialsProvider(credentialsProvider);

Do you check these email threads?
	CredentialsProvider (started on 3/21/2016)
	Proxy Authentication Strategy (started on 4/7/2016)
	Proxy with digest authentication (started on 4/11/2016)



Disclaimer:
The opinions provided herein do not necessarily state or reflect those of Donnell Systems,
Inc.(DSI). DSI makes no warranty for and assumes no legal liability or responsibility for
the posting.

-----Original Message-----
From: Clemens Wyss DEV [mailto:clemensdev@mysign.ch] 
Sent: Wednesday, June 08, 2016 4:44 AM
To: httpclient-users@hc.apache.org
Subject: HttpClient & NTLM-auth

I have read (and tested) hundreds (maybe only dozens ;)) of threads/posts regarding HttpClient
and NTLM auth. 
-plain HttpClient (which I'd prefer!)
-jcifs
- spnego
- ...
None of the snippets I came along works out for me though, always ending up with a 401.

Networksniffing shows, that no credential-negotiation/exchange is taking place...

Taking the latest greatest HttpClient 4.5 what needs to be programmed and  configured(?) to
get my java client to do NTLM authentication with a webservice endpoint?

Do I need to follow anything mentioned here:
http://cr.openjdk.java.net/~weijun/special/krb5winguide-2/raw_files/new/kwin 

Thanks for your advices/hints
- Clemens

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


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


---------------------------------------------------------------------
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