2 implementations of IAntiforgeryValidationFeature
Microsoft.AspNetCore.Antiforgery (1)
Internal\AntiforgeryValidationFeature.cs (1)
5internal sealed class AntiforgeryValidationFeature(bool isValid, AntiforgeryValidationException? exception) : IAntiforgeryValidationFeature
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
Filters\AntiforgeryMiddlewareAuthorizationFilterTest.cs (1)
84private class AntiforgeryValidationFeature(bool isValid, AntiforgeryValidationException exception) : IAntiforgeryValidationFeature
12 references to IAntiforgeryValidationFeature
Microsoft.AspNetCore.Antiforgery (2)
AntiforgeryMiddleware.cs (1)
48context.Features.Set<IAntiforgeryValidationFeature>(new AntiforgeryValidationFeature(false, e));
Internal\AntiforgeryValidationFeature.cs (1)
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)
204if (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)
1512if (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 (4)
Filters\AntiforgeryMiddlewareAuthorizationFilterTest.cs (4)
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));