[Modify] Replace it
This commit is contained in:
parent
bc48dbf68b
commit
4246526a1c
@ -582,11 +582,10 @@ namespace WebSocketSharp.Net
|
||||
_connections.Remove (connection);
|
||||
}
|
||||
|
||||
internal AuthenticationSchemes SelectAuthenticationScheme (HttpListenerContext context)
|
||||
internal AuthenticationSchemes SelectAuthenticationScheme (HttpListenerRequest request)
|
||||
{
|
||||
return AuthenticationSchemeSelector != null
|
||||
? AuthenticationSchemeSelector (context.Request)
|
||||
: _authSchemes;
|
||||
var selector = _authSchemeSelector;
|
||||
return selector != null ? selector (request) : _authSchemes;
|
||||
}
|
||||
|
||||
internal void UnregisterContext (HttpListenerContext context)
|
||||
|
@ -170,7 +170,7 @@ namespace WebSocketSharp.Net
|
||||
|
||||
internal bool Authenticate ()
|
||||
{
|
||||
var schm = _listener.SelectAuthenticationScheme (this);
|
||||
var schm = _listener.SelectAuthenticationScheme (_request);
|
||||
if (schm == AuthenticationSchemes.Anonymous)
|
||||
return true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user