[Modify] Polish it
This commit is contained in:
parent
e9a87d2f3f
commit
127878a1ef
@ -452,8 +452,7 @@ namespace WebSocketSharp.Net.WebSockets
|
||||
return false;
|
||||
}
|
||||
|
||||
var user =
|
||||
HttpUtility.CreateUser (
|
||||
var user = HttpUtility.CreateUser (
|
||||
_request.Headers["Authorization"],
|
||||
scheme,
|
||||
realm,
|
||||
@ -461,13 +460,13 @@ namespace WebSocketSharp.Net.WebSockets
|
||||
credentialsFinder
|
||||
);
|
||||
|
||||
if (user == null || !user.Identity.IsAuthenticated) {
|
||||
SendAuthenticationChallenge (chal);
|
||||
return auth ();
|
||||
}
|
||||
|
||||
if (user != null && user.Identity.IsAuthenticated) {
|
||||
_user = user;
|
||||
return true;
|
||||
}
|
||||
|
||||
SendAuthenticationChallenge (chal);
|
||||
return auth ();
|
||||
};
|
||||
|
||||
return auth ();
|
||||
|
Loading…
Reference in New Issue
Block a user