24 references to ForbidAsync
InProcessWebSite (2)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.cs (2)
252await ctx.ForbidAsync(IISServerDefaults.AuthenticationScheme); 1091public Task Forbidden(HttpContext context) => context.ForbidAsync(IISDefaults.AuthenticationScheme);
Microsoft.AspNetCore.Authentication (1)
RemoteAuthenticationHandler.cs (1)
220=> Context.ForbidAsync(SignInScheme);
Microsoft.AspNetCore.Authentication.Core.Test (2)
AuthenticationServiceTests.cs (2)
76await context.ForbidAsync("base"); 77var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.ForbidAsync("missing"));
Microsoft.AspNetCore.Authentication.Test (17)
CookieTests.cs (3)
1452app.Map("/forbid", signoutApp => signoutApp.Run(context => context.ForbidAsync("Cookies"))); 1620map.Map("/forbid", signoutApp => signoutApp.Run(context => context.ForbidAsync("Cookies"))); 1826await context.ForbidAsync(CookieAuthenticationDefaults.AuthenticationScheme);
GoogleTests.cs (1)
1214await Assert.ThrowsAsync<InvalidOperationException>(() => context.ForbidAsync("Google"));
JwtBearerTests.cs (3)
894await context.ForbidAsync("JwtAuthSchemaOne"); 895await context.ForbidAsync("JwtAuthSchemaTwo"); 1218await context.ForbidAsync(JwtBearerDefaults.AuthenticationScheme);
JwtBearerTests_Handler.cs (3)
839await context.ForbidAsync("JwtAuthSchemaOne"); 840await context.ForbidAsync("JwtAuthSchemaTwo"); 1285await context.ForbidAsync(JwtBearerDefaults.AuthenticationScheme);
MicrosoftAccountTests.cs (1)
406await Assert.ThrowsAsync<InvalidOperationException>(() => context.ForbidAsync("Microsoft"));
PolicyTests.cs (5)
93await context.ForbidAsync("forward"); 149await context.ForbidAsync("forward"); 210await context.ForbidAsync("forward"); 262await context.ForbidAsync("forward"); 319await context.ForbidAsync("forward");
TwitterTests.cs (1)
557await Assert.ThrowsAsync<InvalidOperationException>(() => context.ForbidAsync("Twitter"));
Microsoft.AspNetCore.Authorization.Policy (1)
AuthorizationMiddlewareResultHandler.cs (1)
46await context.ForbidAsync(scheme);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
AuthenticationTests.cs (1)
340return httpContext.ForbidAsync(HttpSysDefaults.AuthenticationScheme);