Share via


AuthorizeAttribute Class

Definition

Specifies that the class or method that this attribute is applied to requires the specified authorization.

public ref class AuthorizeAttribute : Attribute, Microsoft::AspNetCore::Authorization::IAuthorizeData
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)] public class AuthorizeAttribute : Attribute, Microsoft.AspNetCore.Authorization.IAuthorizeData
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)>] type AuthorizeAttribute = class inherit Attribute interface IAuthorizeData
Public Class AuthorizeAttribute Inherits Attribute Implements IAuthorizeData
Inheritance
AuthorizeAttribute
Attributes
Implements

Constructors

AuthorizeAttribute()

Initializes a new instance of the AuthorizeAttribute class.

AuthorizeAttribute(String)

Initializes a new instance of the AuthorizeAttribute class with the specified policy.

Properties

ActiveAuthenticationSchemes
Obsolete.

Gets or sets a comma delimited list of schemes from which user information is constructed.

AuthenticationSchemes

Gets or sets a comma delimited list of schemes from which user information is constructed.

Policy

Gets or sets the policy name that determines access to the resource.

Roles

Gets or sets a comma delimited list of roles that are allowed to access the resource.

Methods

ToString() System.Attribute.ToString

Applies to