Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
AuthorizeAttribute Class
Definition
- Namespace:
- Microsoft.AspNetCore.Authorization
- Assembly:
- Microsoft.AspNetCore.Authorization.dll
- Package:
- Microsoft.AspNetCore.Authorization v1.0.0
- Package:
- Microsoft.AspNetCore.Authorization v1.1.0
- Package:
- Microsoft.AspNetCore.Authorization v10.0.0
- Package:
- Microsoft.AspNetCore.Authorization v11.0.0-preview.4.26230.115
- Package:
- Microsoft.AspNetCore.Authorization v2.0.0
- Package:
- Microsoft.AspNetCore.Authorization v2.1.0
- Package:
- Microsoft.AspNetCore.Authorization v2.2.0
- Package:
- Microsoft.AspNetCore.Authorization v3.0.3
- Package:
- Microsoft.AspNetCore.Authorization v3.1.18
- Package:
- Microsoft.AspNetCore.Authorization v5.0.9
- Package:
- Microsoft.AspNetCore.Authorization v6.0.6
- Package:
- Microsoft.AspNetCore.Authorization v7.0.5
- Package:
- Microsoft.AspNetCore.Authorization v8.0.19
- Package:
- Microsoft.AspNetCore.Authorization v9.0.8
- Source:
- AuthorizeAttribute.cs
- Source:
- AuthorizeAttribute.cs
- Source:
- AuthorizeAttribute.cs
- Source:
- AuthorizeAttribute.cs
- Source:
- AuthorizeAttribute.cs
- Source:
- AuthorizeAttribute.cs
- Source:
- AuthorizeAttribute.cs
- Source:
- AuthorizeAttribute.cs
- Source:
- AuthorizeAttribute.cs
- Source:
- AuthorizeAttribute.cs
- Source:
- AuthorizeAttribute.cs
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
| Name | Description |
|---|---|
| AuthorizeAttribute() |
Initializes a new instance of the AuthorizeAttribute class. |
| AuthorizeAttribute(String) |
Initializes a new instance of the AuthorizeAttribute class with the specified policy. |
Properties
| Name | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ToString() | System.Attribute.ToString |
Applies to
Feedback
Was this page helpful?
