AutoValidateAntiforgeryTokenAttribute Class

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.

Namespace
Microsoft.AspNetCore.Mvc
Assemblies
  • Microsoft.AspNetCore.Mvc.ViewFeatures

Syntax

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public class AutoValidateAntiforgeryTokenAttribute : Attribute, _Attribute, IFilterFactory, IOrderedFilter, IFilterMetadata
class Microsoft.AspNetCore.Mvc.AutoValidateAntiforgeryTokenAttribute

Methods

CreateInstance(System.IServiceProvider)
Return type:Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata
public IFilterMetadata CreateInstance(IServiceProvider serviceProvider)

Properties

Microsoft.AspNetCore.Mvc.AutoValidateAntiforgeryTokenAttribute.IsReusable
Return type:System.Boolean
public bool IsReusable { get; }
Microsoft.AspNetCore.Mvc.AutoValidateAntiforgeryTokenAttribute.Order
Return type:System.Int32
public int Order { get; set; }