1 implementation of ValidateRequestAsync
Microsoft.AspNetCore.Antiforgery (1)
Internal\DefaultAntiforgery.cs (1)
143public async Task ValidateRequestAsync(HttpContext httpContext)
16 references to ValidateRequestAsync
Microsoft.AspNetCore.Antiforgery.Test (6)
AntiforgeryApplicationBuilderExtensionsTest.cs (1)
31antiforgeryService.Verify(antiforgeryService => antiforgeryService.ValidateRequestAsync(httpContext), Times.AtMostOnce());
AntiforgeryMiddlewareTest.cs (5)
19antiforgeryService.Setup(af => af.ValidateRequestAsync(It.IsAny<HttpContext>())).Returns(Task.FromResult(true)); 26antiforgeryService.Verify(antiforgeryService => antiforgeryService.ValidateRequestAsync(httpContext), Times.AtMostOnce()); 39antiforgeryService.Verify(antiforgeryService => antiforgeryService.ValidateRequestAsync(httpContext), Times.Never()); 58antiforgeryService.Verify(antiforgeryService => antiforgeryService.ValidateRequestAsync(httpContext), Times.Never()); 67antiforgeryService.Setup(af => af.ValidateRequestAsync(It.IsAny<HttpContext>())).Returns(Task.FromResult(true));
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
Filters\ValidateAntiforgeryTokenAuthorizationFilter.cs (1)
37await _antiforgery.ValidateRequestAsync(context.HttpContext);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (9)
Filters\AutoValidateAntiforgeryTokenAuthorizationFilterTest.cs (5)
25.Setup(a => a.ValidateRequestAsync(It.IsAny<HttpContext>())) 53.Setup(a => a.ValidateRequestAsync(It.IsAny<HttpContext>())) 68antiforgery.Verify(a => a.ValidateRequestAsync(It.IsAny<HttpContext>()), Times.Never()); 77.Setup(a => a.ValidateRequestAsync(It.IsAny<HttpContext>())) 96antiforgery.Verify(a => a.ValidateRequestAsync(It.IsAny<HttpContext>()), Times.Never());
Filters\ValidateAntiforgeryTokenAuthorizationFilterTest.cs (4)
29.Setup(a => a.ValidateRequestAsync(It.IsAny<HttpContext>())) 53.Setup(a => a.ValidateRequestAsync(It.IsAny<HttpContext>())) 72antiforgery.Verify(a => a.ValidateRequestAsync(It.IsAny<HttpContext>()), Times.Never()); 81.Setup(a => a.ValidateRequestAsync(It.IsAny<HttpContext>()))