[Modify] Polish it
This commit is contained in:
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…
Reference in New Issue
Block a user