AutoValidateAntiforgeryTokenAttribute Class
Definition
An attribute that causes validation of antiforgery tokens for all unsafe HTTP methods. An antiforgery token is required for HTTP methods other than GET, HEAD, OPTIONS, and TRACE.
public ref class AutoValidateAntiforgeryTokenAttribute : Attribute, Microsoft::AspNetCore::Mvc::Filters::IFilterFactory, Microsoft::AspNetCore::Mvc::Filters::IOrderedFilter
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public class AutoValidateAntiforgeryTokenAttribute : Attribute, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type AutoValidateAntiforgeryTokenAttribute = class
inherit Attribute
interface IFilterFactory
interface IFilterMetadata
interface IOrderedFilter
Public Class AutoValidateAntiforgeryTokenAttribute
Inherits Attribute
Implements IFilterFactory, IOrderedFilter
- Inheritance
-
AutoValidateAntiforgeryTokenAttribute
- Attributes
- Implements
Remarks
AutoValidateAntiforgeryTokenAttribute can be applied as a global filter to trigger validation of antiforgery tokens by default for an application. Use IgnoreAntiforgeryTokenAttribute to suppress validation of the antiforgery token for a controller or action.
Constructors
| AutoValidateAntiforgeryTokenAttribute() |
Properties
| IsReusable | |
| Order |
Gets the order value for determining the order of execution of filters. Filters execute in ascending numeric value of the Order property. |
Methods
| CreateInstance(IServiceProvider) |