HubPipelineModule.OnBeforeAuthorizeConnect Method
.NET Framework 4
This method is called before the AuthorizeConnect components of any modules added later to the IHubPipeline are executed. If this returns false, then those later-added modules will not run and the client will not be allowed to subscribe to client-side invocations of methods belonging to the hub defined by the HubDescriptor .
Namespace: Microsoft.AspNet.SignalR.Hubs
Assembly: Microsoft.AspNet.SignalR.Core (in Microsoft.AspNet.SignalR.Core.dll)
Syntax
'Declaration
Protected Overridable Function OnBeforeAuthorizeConnect ( _
hubDescriptor As HubDescriptor, _
request As IRequest _
) As Boolean
'Usage
Dim hubDescriptor As HubDescriptor
Dim request As IRequest
Dim returnValue As Boolean
returnValue = Me.OnBeforeAuthorizeConnect(hubDescriptor, _
request)
protected virtual bool OnBeforeAuthorizeConnect(
HubDescriptor hubDescriptor,
IRequest request
)
protected:
virtual bool OnBeforeAuthorizeConnect(
HubDescriptor^ hubDescriptor,
IRequest^ request
)
abstract OnBeforeAuthorizeConnect :
hubDescriptor:HubDescriptor *
request:IRequest -> bool
override OnBeforeAuthorizeConnect :
hubDescriptor:HubDescriptor *
request:IRequest -> bool
protected function OnBeforeAuthorizeConnect(
hubDescriptor : HubDescriptor,
request : IRequest
) : boolean
Parameters
- hubDescriptor
Type: Microsoft.AspNet.SignalR.Hubs.HubDescriptor
A description of the hub the client is trying to subscribe to.
- request
Type: Microsoft.AspNet.SignalR.IRequest
The connect request of the client trying to subscribe to the hub.
Return Value
Type: System.Boolean
true, if the client is authorized to connect to the hub, false otherwise.