Share via


HubPipelineExtensions.RequireAuthentication Method

.NET Framework 4

Requiring Authentication adds an AuthorizeModule to the IHubPipeline with IAuthorizeHubConnection and IAuthorizeHubMethodInvocation authorizers that will be applied globally to all hubs and hub methods. These authorizers require that the IPrincipal's IIdentity IsAuthenticated for any clients that invoke server-side hub methods or receive client-side hub method invocations.

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

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Sub RequireAuthentication ( _
    pipeline As IHubPipeline _
)
'Usage
Dim pipeline As IHubPipeline 

pipeline.RequireAuthentication()
public static void RequireAuthentication(
    this IHubPipeline pipeline
)
[ExtensionAttribute]
public:
static void RequireAuthentication(
    IHubPipeline^ pipeline
)
static member RequireAuthentication : 
        pipeline:IHubPipeline -> unit
public static function RequireAuthentication(
    pipeline : IHubPipeline
)

Parameters

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IHubPipeline. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.100) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.100).

See Also

Reference

HubPipelineExtensions Class

Microsoft.AspNet.SignalR Namespace