C# Class Microsoft.AspNetCore.SignalR.AuthorizeAttribute

Inheritance: System.Attribute, IAuthorizeHubConnection, IAuthorizeHubMethodInvocation
Show file Open project: FabianGosebrink/ASPNET-Core-Angular2-SignalR-Typescript Class Usage Examples

Private Properties

Property Type Description
SplitString string[]

Public Methods

Method Description
AuthorizeHubConnection ( HubDescriptor hubDescriptor, HttpRequest request ) : bool

Determines whether client is authorized to connect to IHub.

AuthorizeHubMethodInvocation ( IHubIncomingInvokerContext hubIncomingInvokerContext, bool appliesToMethod ) : bool

Determines whether client is authorized to invoke the IHub method.

Protected Methods

Method Description
UserAuthorized ( IPrincipal user ) : bool

When overridden, provides an entry point for custom authorization checks. Called by AuthorizeAttribute.AuthorizeHubConnection and AuthorizeAttribute.AuthorizeHubMethodInvocation.

Private Methods

Method Description
SplitString ( string original ) : string[]

Method Details

AuthorizeHubConnection() public method

Determines whether client is authorized to connect to IHub.
public AuthorizeHubConnection ( HubDescriptor hubDescriptor, HttpRequest request ) : bool
hubDescriptor Microsoft.AspNetCore.SignalR.Hubs.HubDescriptor Description of the hub client is attempting to connect to.
request HttpRequest The (re)connect request from the client.
return bool

AuthorizeHubMethodInvocation() public method

Determines whether client is authorized to invoke the IHub method.
public AuthorizeHubMethodInvocation ( IHubIncomingInvokerContext hubIncomingInvokerContext, bool appliesToMethod ) : bool
hubIncomingInvokerContext IHubIncomingInvokerContext An providing details regarding the method invocation.
appliesToMethod bool Indicates whether the interface instance is an attribute applied directly to a method.
return bool

UserAuthorized() protected method

When overridden, provides an entry point for custom authorization checks. Called by AuthorizeAttribute.AuthorizeHubConnection and AuthorizeAttribute.AuthorizeHubMethodInvocation.
protected UserAuthorized ( IPrincipal user ) : bool
user IPrincipal The for the client being authorize
return bool