I must implement HTTP authentication in my client
application, but faced difficulties to do so.
the server sends WWW-Authenticate field which consists of a scheme part (in my case "Digest"), "nonce" line, and qop part ("auth").
after that I must return a valid authenticated response, which consists of the username, password, "cnonce" field, and the response part.
the way to do so is to work with three security functions
in the following order:
1. EnumerateSecurityPackages - to select the package (like -"digest" in my case)
2. AcquireCredentialsHandle - to obtain the credential handle
3. InitializeSecurityContext - to generate the required response.
the problem is that I don't know how to work with the last two function properly.
all the documentation are very basic, and non of them shows how to actually return a valid response like I need to.
I know that WinInet functions are able to handle authentication but I must do it by myself.