RequireAntiforgeryTokenAttribute Class

Definition

An attribute that can be used to indicate whether the antiforgery token must be validated.

C#
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method)]
public class RequireAntiforgeryTokenAttribute : Attribute, Microsoft.AspNetCore.Antiforgery.IAntiforgeryMetadata
Inheritance
RequireAntiforgeryTokenAttribute
Attributes
Implements

Constructors

RequireAntiforgeryTokenAttribute(Boolean)

An attribute that can be used to indicate whether the antiforgery token must be validated.

Properties

RequiresValidation

Gets or sets a value indicating whether the antiforgery token should be validated.

Applies to

Product Versions
ASP.NET Core 8.0, 9.0