[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; return false;
} }
var user = var user = HttpUtility.CreateUser (
HttpUtility.CreateUser (
_request.Headers["Authorization"], _request.Headers["Authorization"],
scheme, scheme,
realm, realm,
@ -461,13 +460,13 @@ namespace WebSocketSharp.Net.WebSockets
credentialsFinder credentialsFinder
); );
if (user == null || !user.Identity.IsAuthenticated) { if (user != null && user.Identity.IsAuthenticated) {
SendAuthenticationChallenge (chal);
return auth ();
}
_user = user; _user = user;
return true; return true;
}
SendAuthenticationChallenge (chal);
return auth ();
}; };
return auth (); return auth ();