When performing a curl with --ntlm, what is happening between the WWW-Authenticate header being sent back, and then then the second NTLM Authorization header being sent to finally return a 200?
Authorization: NTLM xxxxxxxx
< HTTP/1.1 401 Unauthorized < WWW-Authenticate: NTLM xxxxxxxx
Authorization: NTLM xxxxxxxxxx
< HTTP/1.1 200 OK
I want to be able to take the first NTLM header (this stays constant with the username/password I believe), and build it into a script, take the returned header, and send the second NTLM one back to authenticate. What I don't understand is how the challenge (WWW-Authenticate header?) is taken in, and then sent back as another NTLM header.
I have tried using the WWW-Auth header as the second NTLM-Auth header, I didnt expect it to work but tried.