19 references to AddAuthorizationBuilder
Aspire.Hosting (1)
Dashboard\DashboardServiceHost.cs (1)
96.AddAuthorizationBuilder()
Keycloak.ApiService (1)
Program.cs (1)
16builder.Services.AddAuthorizationBuilder();
Microsoft.AspNetCore.Authorization.Test (17)
AuthorizationBuilderTests.cs (1)
114return services.AddAuthorizationBuilder();
DefaultAuthorizationServiceTests.cs (16)
40services.AddAuthorizationBuilder().AddPolicy("Basic", policy => policy.RequireClaim("Permission", "CanViewPage"))); 56services.AddAuthorizationBuilder().AddPolicy("Basic", policy => 76services.AddAuthorizationBuilder().AddPolicy("Basic", policy => policy.RequireClaim("Permission", "CanViewPage", "CanViewAnything"))); 103services.AddAuthorizationBuilder().AddPolicy("Custom", policy => policy.Requirements.Add(new CustomRequirement())); 128services.AddAuthorizationBuilder() 181services.AddAuthorizationBuilder().AddPolicy("Custom", policy => policy.Requirements.Add(new CustomRequirement())); 204services.AddAuthorizationBuilder().AddPolicy("Basic", policy => policy.RequireClaim("Permission", "CanViewPage", "CanViewAnything"))); 226services.AddAuthorizationBuilder().AddPolicy("Basic", policy => policy.RequireClaim("Permission", "CanViewPage", "CanViewAnything"))); 247services.AddAuthorizationBuilder().AddPolicy("Basic", policy => policy.RequireClaim("Permission", "CanViewPage"))); 268services.AddAuthorizationBuilder().AddPolicy("Basic", policy => policy.RequireClaim("Permission", "CanViewPage"))); 287services.AddAuthorizationBuilder().AddPolicy("Basic", policy => policy.RequireClaim("Permission", "CanViewPage"))); 301services.AddAuthorizationBuilder().AddPolicy("Basic", policy => policy.RequireClaim("Permission", "CanViewPage"))); 316services.AddAuthorizationBuilder().AddPolicy("Basic", policy => policy.RequireClaim("Permission", "CanViewPage"))); 464services.AddAuthorizationBuilder().AddPolicy("Basic", policy => policy.RequireRole("Admin", "Users"))); 483services.AddAuthorizationBuilder().AddPolicy("Basic", policy => { }))); 491services.AddAuthorizationBuilder().AddPolicy("Hao", policy => policy.RequireUserName("Hao")));