public AuthorizeHubConnection ( |
||
hubDescriptor | Description of the hub client is attempting to connect to. | |
request | HttpRequest | The (re)connect request from the client. |
return | bool |
public virtual bool AuthorizeHubConnection(HubDescriptor hubDescriptor, HttpRequest request)
{
if (request == null)
{
throw new ArgumentNullException("request");
}
// If RequireOutgoing is explicitly set to false, authorize all connections.
if (_requireOutgoing.HasValue && !_requireOutgoing.Value)
{
return true;
}
return UserAuthorized(request.HttpContext.User);
}