support authenticating with SHA-256 digest (#524)

This commit is contained in:
Alessandro Ros
2024-02-22 19:12:17 +01:00
committed by GitHub
parent c10f7aaedb
commit f040e20ac4
13 changed files with 241 additions and 120 deletions

View File

@@ -1690,17 +1690,15 @@ func TestClientPlayRedirect(t *testing.T) {
authNonce := "exampleNonce"
authOpaque := "exampleOpaque"
authStale := "FALSE"
authAlg := "MD5"
err = conn.WriteResponse(&base.Response{
Header: base.Header{
"WWW-Authenticate": headers.Authenticate{
Method: headers.AuthDigest,
Realm: authRealm,
Nonce: authNonce,
Opaque: &authOpaque,
Stale: &authStale,
Algorithm: &authAlg,
Method: headers.AuthDigestMD5,
Realm: authRealm,
Nonce: authNonce,
Opaque: &authOpaque,
Stale: &authStale,
}.Marshal(),
},
StatusCode: base.StatusUnauthorized,