[Modify] Polish it
This commit is contained in:
parent
e9a87d2f3f
commit
127878a1ef
@ -452,22 +452,21 @@ 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,
|
_request.HttpMethod,
|
||||||
_request.HttpMethod,
|
credentialsFinder
|
||||||
credentialsFinder
|
);
|
||||||
);
|
|
||||||
|
|
||||||
if (user == null || !user.Identity.IsAuthenticated) {
|
if (user != null && user.Identity.IsAuthenticated) {
|
||||||
SendAuthenticationChallenge (chal);
|
_user = user;
|
||||||
return auth ();
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
_user = user;
|
SendAuthenticationChallenge (chal);
|
||||||
return true;
|
return auth ();
|
||||||
};
|
};
|
||||||
|
|
||||||
return auth ();
|
return auth ();
|
||||||
|
Loading…
Reference in New Issue
Block a user