14 references to IAntiforgeryValidationFeature
Microsoft.AspNetCore.Antiforgery (3)
AntiforgeryMiddleware.cs (1)
48context.Features.Set<IAntiforgeryValidationFeature>(new AntiforgeryValidationFeature(false, e));
Internal\AntiforgeryValidationFeature.cs (2)
5internal sealed class AntiforgeryValidationFeature(bool isValid, AntiforgeryValidationException? exception) : IAntiforgeryValidationFeature 7public static readonly IAntiforgeryValidationFeature Valid = new AntiforgeryValidationFeature(true, null);
Microsoft.AspNetCore.Antiforgery.Test (1)
AntiforgeryMiddlewareTest.cs (1)
27Assert.True(httpContext.Features.Get<IAntiforgeryValidationFeature>()?.IsValid);
Microsoft.AspNetCore.Components.Endpoints (1)
RazorComponentEndpointInvoker.cs (1)
188if (context.Features.Get<IAntiforgeryValidationFeature>() is { } antiForgeryValidationFeature)
Microsoft.AspNetCore.Http (1)
Features\FormFeature.cs (1)
364var hasInvalidToken = _request.HttpContext.Features.Get<IAntiforgeryValidationFeature>() is { IsValid: false };
Microsoft.AspNetCore.Http.Extensions (1)
RequestDelegateFactory.cs (1)
1511if (httpContext.Features.Get<IAntiforgeryValidationFeature>() is { IsValid: false } antiforgeryValidationFeature)
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Filters\AntiforgeryMiddlewareAuthorizationFilter.cs (2)
21var antiforgeryValidationFeature = context.HttpContext.Features.Get<IAntiforgeryValidationFeature>();
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (5)
Filters\AntiforgeryMiddlewareAuthorizationFilterTest.cs (5)
21httpContext.Features.Set<IAntiforgeryValidationFeature>(new AntiforgeryValidationFeature(false, new AntiforgeryValidationException(string.Empty))); 39httpContext.Features.Set<IAntiforgeryValidationFeature>(new AntiforgeryValidationFeature(true, null)); 56httpContext.Features.Set<IAntiforgeryValidationFeature>(new AntiforgeryValidationFeature(false, new AntiforgeryValidationException(string.Empty))); 73httpContext.Features.Set<IAntiforgeryValidationFeature>(new AntiforgeryValidationFeature(true, null)); 84private class AntiforgeryValidationFeature(bool isValid, AntiforgeryValidationException exception) : IAntiforgeryValidationFeature