C# Class Microsoft.AspNet.SignalR.AuthorizeAttribute

Inheritance: System.Attribute, IAuthorizeHubConnection, IAuthorizeHubMethodInvocation
Exibir arquivo Open project: SignalR/SignalR

Private Properties

Property Type Description
SplitString string[]

Public Methods

Method Description
AuthorizeHubConnection ( HubDescriptor hubDescriptor, IRequest 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, IRequest request ) : bool
hubDescriptor Microsoft.AspNet.SignalR.Hubs.HubDescriptor Description of the hub client is attempting to connect to.
request IRequest 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