129 instantiations of AuthorizationPolicyBuilder
Aspire.Dashboard (4)
Aspire.Hosting (1)
CustomPolicyProvider (1)
Microsoft.AspNetCore.Authorization (7)
Microsoft.AspNetCore.Authorization.Policy (2)
Microsoft.AspNetCore.Authorization.Test (73)
AuthorizationMiddlewareTests.cs (36)
27var policy = new AuthorizationPolicyBuilder().RequireAuthenticatedUser().Build();
46var policy = new AuthorizationPolicyBuilder().RequireAuthenticatedUser().Build();
66var policy = new AuthorizationPolicyBuilder().RequireAuthenticatedUser().Build();
85var policy = new AuthorizationPolicyBuilder().RequireAuthenticatedUser().Build();
106var policy = new AuthorizationPolicyBuilder().RequireAuthenticatedUser().Build();
108policyProvider.Setup(p => p.GetDefaultPolicyAsync()).ReturnsAsync(new AuthorizationPolicyBuilder().RequireAssertion(_ => true).Build());
128var policy = new AuthorizationPolicyBuilder().RequireAuthenticatedUser().Build();
150var policy = new AuthorizationPolicyBuilder().RequireAuthenticatedUser().Build();
172var policy = new AuthorizationPolicyBuilder().RequireAuthenticatedUser().AddAuthenticationSchemes("schema1", "schema2").Build();
194var policy = new AuthorizationPolicyBuilder().RequireAssertion(_ => true).Build();
236var policy = new AuthorizationPolicyBuilder().RequireAssertion(_ => true).Build();
278var policy = new AuthorizationPolicyBuilder().RequireAssertion(_ => true).Build();
344return Task.FromResult(new AuthorizationPolicyBuilder().RequireAssertion(_ => true).Build());
356var policy = new AuthorizationPolicyBuilder().RequireAssertion(_ => true).Build();
388var policy = new AuthorizationPolicyBuilder().RequireAssertion(_ => true).Build();
423var policy = new AuthorizationPolicyBuilder().RequireAssertion(_ =>
430policyProvider.Setup(p => p.GetDefaultPolicyAsync()).ReturnsAsync(new AuthorizationPolicyBuilder().RequireAuthenticatedUser().Build());
510policyProvider.Setup(p => p.GetDefaultPolicyAsync()).ReturnsAsync(new AuthorizationPolicyBuilder().RequireAuthenticatedUser().Build());
532policyProvider.Setup(p => p.GetDefaultPolicyAsync()).ReturnsAsync(new AuthorizationPolicyBuilder().RequireAuthenticatedUser().Build());
547var policy = new AuthorizationPolicyBuilder().RequireClaim("Permission", "CanViewPage").Build();
566var policy = new AuthorizationPolicyBuilder().RequireAuthenticatedUser().Build();
587var policy = new AuthorizationPolicyBuilder().RequireAuthenticatedUser().Build();
608var policy = new AuthorizationPolicyBuilder("Fails").RequireAuthenticatedUser().Build();
632var policy = new AuthorizationPolicyBuilder().RequireClaim("Permission", "CanViewComment", "CanViewPage").Build();
652var policy = new AuthorizationPolicyBuilder().RequireAssertion(c =>
681var policy = new AuthorizationPolicyBuilder().RequireAssertion(c =>
705var policy = new AuthorizationPolicyBuilder().RequireRole("Wut").Build();
727var policy = new AuthorizationPolicyBuilder().RequireRole("Wut").AddAuthenticationSchemes("Basic", "Bearer").Build();
748var policy = new AuthorizationPolicyBuilder()
772var policy = new AuthorizationPolicyBuilder().RequireClaim("Permission", "CanViewPage").Build();
795var policy = new AuthorizationPolicyBuilder().RequireRole("Wut").AddAuthenticationSchemes("NotImplemented").Build();
818var policy = new AuthorizationPolicyBuilder().RequireRole("Wut").AddAuthenticationSchemes("Basic", "Bearer").Build();
859var policy = new AuthorizationPolicyBuilder().RequireClaim("Permission", "CanViewPage").Build();
885var policy = new AuthorizationPolicyBuilder().RequireClaim("Permission", "CanViewPage").Build();
917var policy = new AuthorizationPolicyBuilder().RequireClaim("Permission", "CanViewPage").AddAuthenticationSchemes("Bearer").Build();
951var policy = new AuthorizationPolicyBuilder().RequireClaim("Permission", "CanViewPage").Build();
Microsoft.AspNetCore.Http.Connections.Tests (1)
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Microsoft.AspNetCore.Mvc.Core (1)
Microsoft.AspNetCore.Mvc.Core.Test (29)
Microsoft.AspNetCore.Mvc.IntegrationTests (4)
Microsoft.AspNetCore.Routing.FunctionalTests (4)
Microsoft.AspNetCore.SignalR.Tests (1)
41 references to AuthorizationPolicyBuilder
Aspire.Dashboard (2)
CustomPolicyProvider (1)
Microsoft.AspNetCore.Authorization (28)
Microsoft.AspNetCore.Authorization.Policy (3)
Microsoft.AspNetCore.Authorization.Test (6)
Microsoft.AspNetCore.Mvc.Core (1)