4 implementations of ForbidAsync
Microsoft.AspNetCore.Authentication.Core (1)
Microsoft.AspNetCore.Authorization.Test (3)
21 references to ForbidAsync
Microsoft.AspNetCore.Authentication.Abstractions (4)
Microsoft.AspNetCore.Authentication.Core (2)
Microsoft.AspNetCore.Authorization.Test (5)
AuthorizationMiddlewareResultHandlerTests.cs (5)
113authenticationServiceMock.Verify(service => service.ForbidAsync(httpContext, It.IsAny<string>(), null), Times.Exactly(3));
114authenticationServiceMock.Verify(service => service.ForbidAsync(httpContext, firstScheme, null), Times.Once);
115authenticationServiceMock.Verify(service => service.ForbidAsync(httpContext, secondScheme, null), Times.Once);
116authenticationServiceMock.Verify(service => service.ForbidAsync(httpContext, thirdScheme, null), Times.Once);
131authenticationServiceMock.Verify(service => service.ForbidAsync(httpContext, null, null), Times.Once);
Microsoft.AspNetCore.Http.Results.Tests (5)
ForbidResultTests.cs (5)
21.Setup(c => c.ForbidAsync(It.IsAny<HttpContext>(), "", null))
41.Setup(c => c.ForbidAsync(It.IsAny<HttpContext>(), "Scheme1", authProperties))
45.Setup(c => c.ForbidAsync(It.IsAny<HttpContext>(), "Scheme2", authProperties))
73.Setup(c => c.ForbidAsync(It.IsAny<HttpContext>(), null, expected))
94.Setup(c => c.ForbidAsync(It.IsAny<HttpContext>(), null, expected))
Microsoft.AspNetCore.Mvc.Core.Test (5)
ForbidResultTest.cs (5)
24.Setup(c => c.ForbidAsync(httpContext.Object, "", null))
51.Setup(c => c.ForbidAsync(httpContext.Object, "Scheme1", authProperties))
55.Setup(c => c.ForbidAsync(httpContext.Object, "Scheme2", authProperties))
89.Setup(c => c.ForbidAsync(httpContext.Object, null, expected))
117.Setup(c => c.ForbidAsync(httpContext.Object, null, expected))