Need to make http call using golang client (net/http) which requires integrated windows authentication (NTLM) (similar issue ) its not working.. - i am not what am missing below is the code that i use.. (package used - ntlmssp "github.com/Azure/go-ntlmssp")
client := &http.Client{
Transport: ntlmssp.Negotiator{
RoundTripper: &http.Transport{},
},
}
req, _ := http.NewRequest("GET", url1, nil)
req.SetBasicAuth("login", "password")
res, err := client.Do(req)
I get the error the following response ..
{401 Unauthorized 401 HTTP/1.1 1 1 map[Content-Type:[text/html] Server:[Microsoft-IIS/8.5] Www-Authenticate:[NTLM Negotiate]
Appears to work when i run against a local webserver which has windows auth enabled... differene i notice is in the IIS version - not sure how it impacts NTLM...
200 OK 200 HTTP/1.1 1 1 map[Content-Type:[text/html] Accept-Ranges:[bytes] Server:[Microsoft-IIS/10.0] Persistent-Auth:[true] L
In addition.. when i notice the NTLM handshake - this is what i see (not very familiar with NTLM handshake/what it would imply... ) so not sure if this means anything...