Dela via


RequiresAuthorizationAttribute Class

Definition

Caution

Please use the new AuthorizeLevelAttribute class instead.

Apply this attribute to ApiController actions or controllers 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.Obsolete("Please use the new AuthorizeLevelAttribute class instead.")]
public sealed class RequiresAuthorizationAttribute : System.Web.Http.AuthorizeLevelAttribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
[<System.Obsolete("Please use the new AuthorizeLevelAttribute class instead.")>]
type RequiresAuthorizationAttribute = class
    inherit AuthorizeLevelAttribute
Public NotInheritable Class RequiresAuthorizationAttribute
Inherits AuthorizeLevelAttribute
Inheritance
System.Web.Http.AuthorizeLevelAttribute
RequiresAuthorizationAttribute
Attributes

Constructors

RequiresAuthorizationAttribute(AuthorizationLevel)

Initialize a new instance of the RequiresAuthorizationAttribute with a given level.

Applies to