Timur
Timur

Reputation: 1

Preemptive authentication with NTLM httpcomponents-client 4.x

Is it possible to use the approach outline Preemptive Basic authentication with Apache HttpClient 4 with NTLM authentication?

Our app makes multiple single request from Java to windows server application. The requests aren't usually in a logical group. I was hoping to cut down on the handshaking and just preemptively pass the creds.

Thanks

Upvotes: 0

Views: 1168

Answers (1)

ok2c
ok2c

Reputation: 27583

NTLM auth scheme cannot be used preemptively. It is a complex, state-full authentication protocol that involves multiple (two in NTLMv1 and NTLMv2) challenge / response exchanges. Once authenticated an NTLM secured connection is associated with a particular user identity and all subsequent requests are executed within that context.

Upvotes: 3

Related Questions