Export (0) Print
Expand All

AuthorizeAttribute Class

.NET Framework 4
.NET Framework 4

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

System.Object
  System.Attribute
    Microsoft.AspNet.SignalR.AuthorizeAttribute

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

'Declaration
<AttributeUsageAttribute(AttributeTargets.Class Or AttributeTargets.Method, Inherited := True,  _
	AllowMultiple := True)> _
Public Class AuthorizeAttribute _
	Inherits Attribute _
	Implements IAuthorizeHubConnection, IAuthorizeHubMethodInvocation
'Usage
Dim instance As AuthorizeAttribute

The AuthorizeAttribute type exposes the following members.

  NameDescription
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.
Top

  NameDescription
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).
Top

  NameDescription
Protected field_requireOutgoing
Top

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