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
Inheritance Hierarchy¶
System.Object
System.Attribute
Microsoft.AspNetCore.Mvc.AutoValidateAntiforgeryTokenAttribute
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)
-