共用方式為


AuthorizeLevelAttribute Class

Definition

Important

This API is not CLS-compliant.

Apply this attribute to SignalR Microsoft.AspNet.SignalR.Hub classes or methods to control access to them. Based on the AuthorizationLevel specified, access to the target action will be restricted to requests that have been granted that level or higher.

[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
[System.CLSCompliant(false)]
public class AuthorizeLevelAttribute : Microsoft.AspNet.SignalR.AuthorizeAttribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
[<System.CLSCompliant(false)>]
type AuthorizeLevelAttribute = class
    inherit AuthorizeAttribute
Public Class AuthorizeLevelAttribute
Inherits AuthorizeAttribute
Inheritance
Microsoft.AspNet.SignalR.AuthorizeAttribute
AuthorizeLevelAttribute
Attributes

Constructors

AuthorizeLevelAttribute(AuthorizationLevel)

Initializes a new instance of the AuthorizeLevelAttribute with a given level.

Properties

Level

The minimum authorization level required to access the resource.

Methods

UserAuthorized(IPrincipal) Microsoft.AspNet.SignalR.AuthorizeAttribute.UserAuthorized(System.Security.Principal.IPrincipal)

Applies to