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