Fix typo in HA2() function, which caused Digest auth test to fail, when 'qop' parameter is set to 'auth-int'.
Please add tests for this. Also, folks do not need the module name (or any other non-standard shorthand) in the commit message. Please simplify your message to "Pass algorithm parameter to hash function" with an explanation of why in the paragraph of the message.
Pass algorithm parameter to H()
This fixes error 500 on digest-auth test with qop='auth-int' (#307)
Add test implementation for Digest authentication
It can be used for testing of all available combinations of qop (auth/auth-int/not specified) and algorithms (MD5, SHA-256).
Check response status code in test_digest_auth_with_wrong_password()
Add test for different combinations of digest auth parameters
Enable test cases for Digest auth requests with or without body
When quality-of-protection (qop) is 'auth-int', the hash of request body is used to create digest response.
Update comments, minor fixes
Minor refactoring of _test_digest_auth
Instead of joining encoded (binary) strings, join unicode strings first, then encode result, which leads to shorter and clearer code.
Encode HA2() string parameters 'method', 'uri' and 'H(entityBody)'
This fixes error 500, when httpbin is run with python3 and digest-auth is attempted with qop='auth-int'.
@sigmavirus24 I have added extensive tests for all combinations of Digest Authentication (DA) parameters, also tested manually with curl. The previous version of test_digest_auth() used only one set of parameters (qop='auth', algorithm='MD5')
@felixpalta thanks so very much! That's awesome!