xinsnake / go-http-digest-auth-client

Golang Http Digest Authentication Client
BSD 2-Clause "Simplified" License
41 stars 68 forks source link

401 Unauthorized #7

Closed mihaipopescu0409 closed 6 years ago

mihaipopescu0409 commented 6 years ago

Hello,

I am trying to authenticate on a server that uses digest authentication. After installing your plugin, i still receive 401.

uri := "http://localhost:18082/json_rpc"
fmt.Println("-----")
dr := dac.NewRequest("mihai", "mihai", "POST", uri, "")
response1, err := dr.Execute()
fmt.Println(response1)
fmt.Println("-----")

This is the server response:

HTTP/1.1 401 Unauthorized
Server: Epee-based
Content-Length: 98
Content-Type: text/html
Last-Modified: Tue, 02 Jan 2018 14:20:12 GMT
Accept-Ranges: bytes
WWW-authenticate:Digest qop="auth",algorithm=MD5,realm="monero-rpc",nonce="PfLdSGoqjOOSMw5bmJOv/g==",stale=false
WWW-authenticate:Digest qop="auth",algorithm=MD5-sess,realm="monero-rpc",nonce="PfLdSGoqjOOSMw5bmJOv/g==",stale=false

PS: I have also tried with http.Request

What am i doing wrong? Thanks

xinsnake commented 6 years ago

@mihaipopescu0409 sorry for the late response, can I please confirm is this still something that requires attention?

xinsnake commented 6 years ago

@mihaipopescu0409 please reopen if you are still experiencing issues.