ValidateAntiForgeryTokenAttribute Class¶
Specifies that the class or method that this attribute is applied validates the anti-forgery token. If the anti-forgery token is not available, or if the token is invalid, the validation will fail and the action method will not execute.
- Namespace
Microsoft.AspNetCore.Mvc
- Assemblies
- Microsoft.AspNetCore.Mvc.ViewFeatures
Inheritance Hierarchy¶
System.Object
System.Attribute
Microsoft.AspNetCore.Mvc.ValidateAntiForgeryTokenAttribute
Syntax¶
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public class ValidateAntiForgeryTokenAttribute : Attribute, _Attribute, IFilterFactory, IOrderedFilter, IFilterMetadata
-
class
Microsoft.AspNetCore.Mvc.
ValidateAntiForgeryTokenAttribute
Methods¶
-
CreateInstance
(System.IServiceProvider)¶ Return type: Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata public IFilterMetadata CreateInstance(IServiceProvider serviceProvider)
-