[Modify] Polish it
This commit is contained in:
parent
ac311e7759
commit
a3115d1161
@ -168,15 +168,18 @@ namespace WebSocketSharp.Net
|
|||||||
|
|
||||||
#region Internal Methods
|
#region Internal Methods
|
||||||
|
|
||||||
internal bool IsValid (string password, string realm, string method, string entity)
|
internal bool IsValid (
|
||||||
|
string password, string realm, string method, string entity
|
||||||
|
)
|
||||||
{
|
{
|
||||||
var parameters = new NameValueCollection (_parameters);
|
var copied = new NameValueCollection (_parameters);
|
||||||
parameters["password"] = password;
|
copied["password"] = password;
|
||||||
parameters["realm"] = realm;
|
copied["realm"] = realm;
|
||||||
parameters["method"] = method;
|
copied["method"] = method;
|
||||||
parameters["entity"] = entity;
|
copied["entity"] = entity;
|
||||||
|
|
||||||
return _parameters["response"] == AuthenticationResponse.CreateRequestDigest (parameters);
|
var expected = AuthenticationResponse.CreateRequestDigest (copied);
|
||||||
|
return _parameters["response"] == expected;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
Loading…
Reference in New Issue
Block a user