Class AutoValidateAntiforgeryTokenFilter
public class AutoValidateAntiforgeryTokenFilter
- Inheritance
-
objectAutoValidateAntiforgeryTokenFilter
Constructors
AutoValidateAntiforgeryTokenFilter(IAntiforgery, ILogger<AutoValidateAntiforgeryTokenFilter>)
public AutoValidateAntiforgeryTokenFilter(IAntiforgery antiforgery, ILogger<AutoValidateAntiforgeryTokenFilter> filelogger)
Parameters
antiforgery
IAntiforgeryfilelogger
ILogger<AutoValidateAntiforgeryTokenFilter>
Methods
OnAuthorizationAsync(AuthorizationFilterContext)
Called early in the filter pipeline to confirm request is authorized.
public Task OnAuthorizationAsync(AuthorizationFilterContext context)
Parameters
context
AuthorizationFilterContextThe Microsoft.AspNetCore.Mvc.Filters.AuthorizationFilterContext.
Returns
- Task
A System.Threading.Tasks.Task that on completion indicates the filter has executed.
ShouldValidate(AuthorizationFilterContext)
protected virtual bool ShouldValidate(AuthorizationFilterContext context)
Parameters
context
AuthorizationFilterContext
Returns
- bool