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