AutoValidateAntiforgeryTokenAttribute Clase

Definición

Atributo que provoca la validación de tokens antiforgería para todos los métodos HTTP no seguros. Se requiere un token de antiforgería para métodos HTTP distintos de GET, HEAD, OPTIONS y TRACE.

public ref class AutoValidateAntiforgeryTokenAttribute : Attribute, Microsoft::AspNetCore::Mvc::Filters::IFilterFactory, Microsoft::AspNetCore::Mvc::Filters::IOrderedFilter
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public class AutoValidateAntiforgeryTokenAttribute : Attribute, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type AutoValidateAntiforgeryTokenAttribute = class
    inherit Attribute
    interface IFilterFactory
    interface IFilterMetadata
    interface IOrderedFilter
Public Class AutoValidateAntiforgeryTokenAttribute
Inherits Attribute
Implements IFilterFactory, IOrderedFilter
Herencia
AutoValidateAntiforgeryTokenAttribute
Atributos
Implementaciones

Comentarios

AutoValidateAntiforgeryTokenAttribute se puede aplicar como filtro global para desencadenar la validación de tokens antiforgería de forma predeterminada para una aplicación. Use IgnoreAntiforgeryTokenAttribute para suprimir la validación del token antiforgería de un controlador o una acción.

Constructores

AutoValidateAntiforgeryTokenAttribute()

Atributo que provoca la validación de tokens antiforgería para todos los métodos HTTP no seguros. Se requiere un token de antiforgería para métodos HTTP distintos de GET, HEAD, OPTIONS y TRACE.

Propiedades

IsReusable

Obtiene un valor que indica si el resultado de CreateInstance(IServiceProvider) se puede reutilizar entre solicitudes.

Order

Obtiene el valor de orden para determinar el orden de ejecución de filtros. Los filtros se ejecutan en un valor numérico ascendente de la Order propiedad .

Métodos

CreateInstance(IServiceProvider)

Crea una instancia del filtro ejecutable.

Se aplica a