[Modify] Polish it

This commit is contained in:
sta 2018-04-23 21:36:57 +09:00
parent e9a87d2f3f
commit 127878a1ef

View File

@ -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 ();