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)
1459app.Map("/forbid", signoutApp => signoutApp.Run(context => context.ForbidAsync("Cookies"))); 1627map.Map("/forbid", signoutApp => signoutApp.Run(context => context.ForbidAsync("Cookies"))); 1833await context.ForbidAsync(CookieAuthenticationDefaults.AuthenticationScheme);
GoogleTests.cs (1)
1221await Assert.ThrowsAsync<InvalidOperationException>(() => context.ForbidAsync("Google"));
JwtBearerTests.cs (3)
893await context.ForbidAsync("JwtAuthSchemaOne"); 894await context.ForbidAsync("JwtAuthSchemaTwo"); 1217await context.ForbidAsync(JwtBearerDefaults.AuthenticationScheme);
JwtBearerTests_Handler.cs (3)
839await context.ForbidAsync("JwtAuthSchemaOne"); 840await context.ForbidAsync("JwtAuthSchemaTwo"); 1285await context.ForbidAsync(JwtBearerDefaults.AuthenticationScheme);
MicrosoftAccountTests.cs (1)
413await 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)
564await 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);