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