AuthorizeAttribute Class

Visual Studio 2010
.NET Framework 4

Apply to Hubs and Hub methods to authorize client connections to Hubs and authorize client invocations of Hub methods.


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

public class AuthorizeAttribute extends Attribute implements IAuthorizeHubConnection, IAuthorizeHubMethodInvocation

The AuthorizeAttribute type exposes the following members.

Public propertyRequireOutgoingSet to false to apply authorization only to the invocations of any of the Hub's server-side methods. This property only affects attributes applied to the Hub class. This property cannot be read.
Public propertyRolesGets or sets the user roles.
Public propertyTypeId (Inherited from Attribute.)
Public propertyUsersGets or sets the authorized users.

Public methodAuthorizeHubConnectionDetermines whether client is authorized to connect to IHub.
Public methodAuthorizeHubMethodInvocationDetermines whether client is authorized to invoke the IHub method.
Public methodEquals (Inherited from Attribute.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Attribute.)
Public methodGetType (Inherited from Object.)
Public methodIsDefaultAttribute (Inherited from Attribute.)
Public methodMatch (Inherited from Attribute.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Protected methodUserAuthorizedWhen overridden, provides an entry point for custom authorization checks. Called by AuthorizeHubConnection(HubDescriptor, IRequest) and AuthorizeHubMethodInvocation(IHubIncomingInvokerContext, Boolean).

Protected field_requireOutgoing

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.