11 instantiations of AntiforgeryValidationException
Microsoft.AspNetCore.Antiforgery (8)
Internal\DefaultAntiforgery.cs (5)
152throw new AntiforgeryValidationException( 161throw new AntiforgeryValidationException(message); 166throw new AntiforgeryValidationException(message); 173throw new AntiforgeryValidationException(message); 204throw new AntiforgeryValidationException(message);
Internal\DefaultAntiforgeryTokenSerializer.cs (1)
69throw new AntiforgeryValidationException(Resources.AntiforgeryToken_DeserializationFailed, innerException);
Internal\DefaultAntiforgeryTokenStore.cs (2)
64throw new AntiforgeryValidationException(Resources.AntiforgeryToken_UnableToReadRequest, ex); 70throw new AntiforgeryValidationException(Resources.AntiforgeryToken_UnableToReadRequest, ex);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (3)
Filters\AntiforgeryMiddlewareAuthorizationFilterTest.cs (2)
21httpContext.Features.Set<IAntiforgeryValidationFeature>(new AntiforgeryValidationFeature(false, new AntiforgeryValidationException(string.Empty))); 56httpContext.Features.Set<IAntiforgeryValidationFeature>(new AntiforgeryValidationFeature(false, new AntiforgeryValidationException(string.Empty)));
Filters\ValidateAntiforgeryTokenAuthorizationFilterTest.cs (1)
82.Throws(new AntiforgeryValidationException("Failed"))
17 references to AntiforgeryValidationException
Microsoft.AspNetCore.Antiforgery (6)
AntiforgeryMiddleware.cs (1)
46catch (AntiforgeryValidationException e)
AntiforgeryValidationException.cs (2)
12/// Creates a new instance of <see cref="AntiforgeryValidationException"/> with the specified 22/// Creates a new instance of <see cref="AntiforgeryValidationException"/> with the specified
IAntiforgery.cs (1)
55/// <exception cref="AntiforgeryValidationException">
Internal\AntiforgeryValidationFeature.cs (1)
5internal sealed class AntiforgeryValidationFeature(bool isValid, AntiforgeryValidationException? exception) : IAntiforgeryValidationFeature
Internal\DefaultAntiforgery.cs (1)
440catch (AntiforgeryValidationException ex)
Microsoft.AspNetCore.Antiforgery.Test (9)
DefaultAntiforgeryTest.cs (5)
794var exception = await Assert.ThrowsAsync<AntiforgeryValidationException>( 858var exception = await Assert.ThrowsAsync<AntiforgeryValidationException>( 882var exception = await Assert.ThrowsAsync<AntiforgeryValidationException>( 908var exception = await Assert.ThrowsAsync<AntiforgeryValidationException>( 934var exception = await Assert.ThrowsAsync<AntiforgeryValidationException>(
DefaultAntiforgeryTokenSerializerTest.cs (2)
50var ex = Assert.Throws<AntiforgeryValidationException>(() => testSerializer.Deserialize(serializedToken));
DefaultAntiforgeryTokenStoreTest.cs (2)
313var ex = await Assert.ThrowsAsync<AntiforgeryValidationException>(() => tokenStore.GetRequestTokensAsync(httpContext.Object)); 338var ex = await Assert.ThrowsAsync<AntiforgeryValidationException>(() => tokenStore.GetRequestTokensAsync(httpContext.Object));
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
Filters\ValidateAntiforgeryTokenAuthorizationFilter.cs (1)
39catch (AntiforgeryValidationException exception)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
Filters\AntiforgeryMiddlewareAuthorizationFilterTest.cs (1)
84private class AntiforgeryValidationFeature(bool isValid, AntiforgeryValidationException exception) : IAntiforgeryValidationFeature