Closed robinmayerhofer closed 4 years ago
Great, thank you! Just tidied this up a bit and added some stuff to README.md in 93e5377. I'll publish a new version soon.
Thanks for the fast response & merge!
Version 1.3.0 has now been published with this change.
Hi!
I made some changes to support NTLM as a fallback for
WWW-Authenticate: Negotiate
. As you can see in the Microsoft Docs on HTTP Authentication NTLM can be used as a fallback if the Kerberos protocol is unavailable. However, if the Kerberos protocol is unavailable, a server might expect and send messages usingNegotiate <base64 encoded message>
. (I found no documentation on whether the header prefix may change toNTLM
, but in my use case it only works withNegotiate
)Therefore, I introduced a new variable
headerPrefix
in theNTLMClient
and passed it to all helper functions for message 1-3. All newheaderPrefix
parameters for constructors/functions have their default value set toNTLM
and are optional, to provide full backwards compatibility.