Table of Contents

Class AutoValidateAntiforgeryTokenAttribute

Namespace
Oqtane.Security
Assembly
Oqtane.Server.dll
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public class AutoValidateAntiforgeryTokenAttribute : Attribute
Inheritance
AutoValidateAntiforgeryTokenAttribute

Properties

IsReusable

Gets a value that indicates if the result of CreateInstance(IServiceProvider) can be reused across requests.

public bool IsReusable { get; }

Property Value

bool

Order

Gets the order value for determining the order of execution of filters. Filters execute in ascending numeric value of the Order property.

public int Order { get; set; }

Property Value

int

Remarks

Filters are executed in an ordering determined by an ascending sort of the Order property.

Asynchronous filters, such as IAsyncActionFilter, surround the execution of subsequent filters of the same filter kind. An asynchronous filter with a lower numeric Order value will have its filter method, such as OnActionExecutionAsync(ActionExecutingContext, ActionExecutionDelegate), executed before that of a filter with a higher value of Order.

Synchronous filters, such as IActionFilter, have a before-method, such as OnActionExecuting(ActionExecutingContext), and an after-method, such as OnActionExecuted(ActionExecutedContext). A synchronous filter with a lower numeric Order value will have its before-method executed before that of a filter with a higher value of Order. During the after-stage of the filter, a synchronous filter with a lower numeric Order value will have its after-method executed after that of a filter with a higher value of Order.

If two filters have the same numeric value of Order, then their relative execution order is determined by the filter scope.

Methods

CreateInstance(IServiceProvider)

Creates an instance of the executable filter.

public IFilterMetadata CreateInstance(IServiceProvider serviceProvider)

Parameters

serviceProvider IServiceProvider

The request IServiceProvider.

Returns

IFilterMetadata

An instance of the executable filter.