Start the nonce count with value 1
The nounce count contains the number of times the client has sent the nonce value in the request (see Section 3.2.2 of RFC 2617). This should start with 1 because the initial request contains the value.
Also, IIS 10.0 seems to ignore requests where nonce count is 0 and resends a "HTTP 401 Authorization Required" response.
See also: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2003/cc780170(v=ws.10)
This fixed an issue for me trying to talk to the MongoDB Atlas API. It would not authenticate until I used this patch. Do recommend merging.
Also ran into this issue, is this project maintained?
@p-mongo It doesn't seem like it. I am using a locally patched gem as a result, unfortunately.