[Modify] Polish it

master
sta 7 years ago
parent ac5559b15d
commit bfbc42097e

@ -801,15 +801,15 @@ namespace WebSocketSharp.Net
if (cred == null)
return null;
if (scheme == AuthenticationSchemes.Basic
&& ((HttpBasicIdentity) id).Password != cred.Password
) {
if (scheme == AuthenticationSchemes.Basic) {
var basicId = (HttpBasicIdentity) id;
if (basicId.Password != cred.Password)
return null;
}
if (scheme == AuthenticationSchemes.Digest
&& !((HttpDigestIdentity) id).IsValid (cred.Password, realm, method, null)
) {
if (scheme == AuthenticationSchemes.Digest) {
var digestId = (HttpDigestIdentity) id;
if (!digestId.IsValid (cred.Password, realm, method, null))
return null;
}

Loading…
Cancel
Save