Share via


HubPipelineModule.BuildAuthorizeConnect Method

.NET Framework 4

Wraps a function to be called before a client subscribes to signals belonging to the hub described by the HubDescriptor . By default, the AuthorizeModule will look for attributes on the IHub to help determine if the client is authorized to subscribe to method invocations for the described hub. The function returns true if the client is authorized to subscribe to client-side hub method invocations; false, otherwise.

Namespace:  Microsoft.AspNet.SignalR.Hubs
Assembly:  Microsoft.AspNet.SignalR.Core (in Microsoft.AspNet.SignalR.Core.dll)

Syntax

'Declaration
Public Overridable Function BuildAuthorizeConnect ( _
    authorizeConnect As Func(Of HubDescriptor, IRequest, Boolean) _
) As Func(Of HubDescriptor, IRequest, Boolean)
'Usage
Dim instance As HubPipelineModule 
Dim authorizeConnect As Func(Of HubDescriptor, IRequest, Boolean)
Dim returnValue As Func(Of HubDescriptor, IRequest, Boolean)

returnValue = instance.BuildAuthorizeConnect(authorizeConnect)
public virtual Func<HubDescriptor, IRequest, bool> BuildAuthorizeConnect(
    Func<HubDescriptor, IRequest, bool> authorizeConnect
)
public:
virtual Func<HubDescriptor^, IRequest^, bool>^ BuildAuthorizeConnect(
    Func<HubDescriptor^, IRequest^, bool>^ authorizeConnect
)
abstract BuildAuthorizeConnect : 
        authorizeConnect:Func<HubDescriptor, IRequest, bool> -> Func<HubDescriptor, IRequest, bool> 
override BuildAuthorizeConnect : 
        authorizeConnect:Func<HubDescriptor, IRequest, bool> -> Func<HubDescriptor, IRequest, bool> 
public function BuildAuthorizeConnect(
    authorizeConnect : Func<HubDescriptor, IRequest, boolean>
) : Func<HubDescriptor, IRequest, boolean>

Parameters

Return Value

Type: System.Func<HubDescriptor, IRequest, Boolean>
A wrapped function that dictates whether or not the client is authorized to connect to the described Hub.

Implements

IHubPipelineModule.BuildAuthorizeConnect(Func<HubDescriptor, IRequest, Boolean>)

See Also

Reference

HubPipelineModule Class

Microsoft.AspNet.SignalR.Hubs Namespace