4 implementations of ForbidAsync
Microsoft.AspNetCore.Authentication.Core (1)
AuthenticationService.cs (1)
135public virtual async Task ForbidAsync(HttpContext context, string? scheme, AuthenticationProperties? properties)
Microsoft.AspNetCore.Authorization.Test (3)
PolicyEvaluatorTests.cs (2)
195public Task ForbidAsync(HttpContext context, string scheme, AuthenticationProperties properties) 218public Task ForbidAsync(HttpContext context, string scheme, AuthenticationProperties properties)
TestObjects\TestAuthenticationService.cs (1)
39public Task ForbidAsync(HttpContext context, string scheme, AuthenticationProperties properties)
21 references to ForbidAsync
Microsoft.AspNetCore.Authentication.Abstractions (4)
AuthenticationHttpContextExtensions.cs (1)
116GetAuthenticationService(context).ForbidAsync(context, scheme, properties);
AuthenticationOptions.cs (1)
89/// Used as the default scheme by <see cref="IAuthenticationService.ForbidAsync(HttpContext, string, AuthenticationProperties)"/>.
IAuthenticationSchemeProvider.cs (2)
43/// Returns the scheme that will be used by default for <see cref="IAuthenticationService.ForbidAsync(HttpContext, string, AuthenticationProperties)"/>. 47/// <returns>The scheme that will be used by default for <see cref="IAuthenticationService.ForbidAsync(HttpContext, string, AuthenticationProperties)"/>.</returns>
Microsoft.AspNetCore.Authentication.Core (2)
AuthenticationSchemeProvider.cs (2)
85/// Returns the scheme that will be used by default for <see cref="IAuthenticationService.ForbidAsync(HttpContext, string, AuthenticationProperties)"/>. 89/// <returns>The scheme that will be used by default for <see cref="IAuthenticationService.ForbidAsync(HttpContext, string, AuthenticationProperties)"/>.</returns>
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))