Class ValidateAntiForgeryTokenAttribute
Represents an attribute that is used to prevent forgery of a request.
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public sealed class ValidateAntiForgeryTokenAttribute : FilterAttribute, IMvcFilter, IAuthorizationFilter
- Inheritance
-
ValidateAntiForgeryTokenAttribute
- Implements
- Inherited Members
Constructors
ValidateAntiForgeryTokenAttribute()
Initializes a new instance of the ValidateAntiForgeryTokenAttribute class.
public ValidateAntiForgeryTokenAttribute()
Methods
OnAuthorization(AuthorizationContext)
Called when authorization is required.
public void OnAuthorization(AuthorizationContext filterContext)
Parameters
filterContext
AuthorizationContextThe filter context.
Exceptions
- ArgumentNullException
The
filterContext
parameter is null.