Udostępnij za pośrednictwem


AuthorizeModule.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 hub 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 Overrides Function BuildAuthorizeConnect ( _
    authorizeConnect As Func(Of HubDescriptor, IRequest, Boolean) _
) As Func(Of HubDescriptor, IRequest, Boolean)
'Usage
Dim instance As AuthorizeModule 
Dim authorizeConnect As Func(Of HubDescriptor, IRequest, Boolean)
Dim returnValue As Func(Of HubDescriptor, IRequest, Boolean)

returnValue = instance.BuildAuthorizeConnect(authorizeConnect)
public override Func<HubDescriptor, IRequest, bool> BuildAuthorizeConnect(
    Func<HubDescriptor, IRequest, bool> authorizeConnect
)
public:
virtual Func<HubDescriptor^, IRequest^, bool>^ BuildAuthorizeConnect(
    Func<HubDescriptor^, IRequest^, bool>^ authorizeConnect
) override
abstract BuildAuthorizeConnect : 
        authorizeConnect:Func<HubDescriptor, IRequest, bool> -> Func<HubDescriptor, IRequest, bool> 
override BuildAuthorizeConnect : 
        authorizeConnect:Func<HubDescriptor, IRequest, bool> -> Func<HubDescriptor, IRequest, bool> 
public override 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

AuthorizeModule Class

Microsoft.AspNet.SignalR.Hubs Namespace