Hi,
I am using HttpClientBuilder to create an HttpClient with NTLM
authentication, but looking at the logs it tries SPNEGO first then NTLM.
Since I am only interested in NTLM, to increase the efficiency of
requests I want it to be the first authenticator tried. How do I do this
when I am using the following code to set up the HttpClient?
{
.......
HttpClientBuilder clientBuilder = HttpClients.custom()
.useSystemProperties()
.setUserAgent("Mozilla/5.0");
// authentication/credentials...
if (credsProvider == null)
{
credsProvider = new BasicCredentialsProvider();
final NTCredentials credentials =
new NTCredentials(username, password, workstation, domain);
credsProvider.setCredentials(AuthScope.ANY, credentials);
}
clientBuilder =
clientBuilder.setDefaultCredentialsProvider(credsProvider);
return Executor.newInstance(clientBuilder.build());
}
--
Untitled Document
*Christopher Mugdan *
Senior Software Developer
Phone: +61 (0)2 9045 3391
Mobile: +61 (0)412 398 104
Email: chr...@integeo.com <mailto:chr...@integeo.com%20>
Skype: chrismugdan
www.integeo.com <https://www.integeo.com>