35 references to RequireClaim
Aspire.Dashboard (3)
Authentication\OpenIdConnect\AuthorizationPolicyBuilderExtensions.cs (1)
35builder.RequireClaim(claimType);
DashboardWebApplication.cs (2)
787.RequireClaim(FrontendAuthorizationDefaults.BrowserTokenClaimName) 794.RequireClaim(FrontendAuthorizationDefaults.UnsecuredClaimName)
BasicWebSite (2)
ConfigureAuthPolicies.cs (2)
18policy.RequireClaim("Never"); 23policy.RequireClaim(ClaimTypes.NameIdentifier);
JwtSample (1)
Startup.cs (1)
25policy.RequireClaim(ClaimTypes.NameIdentifier);
Microsoft.AspNetCore.Authorization.Test (7)
AuthorizationPolicyFacts.cs (4)
28options.AddPolicy("1", policy => policy.RequireClaim("1")); 29options.AddPolicy("2", policy => policy.RequireClaim("2")); 78options.DefaultPolicy = new AuthorizationPolicyBuilder("default").RequireClaim("default").Build(); 79options.AddPolicy("2", policy => policy.RequireClaim("2"));
DefaultAuthorizationServiceTests.cs (3)
371var policy = new AuthorizationPolicyBuilder().RequireClaim(ClaimTypes.Role); 392var policy = new AuthorizationPolicyBuilder("AuthType").RequireClaim(ClaimTypes.Name); 1048return Task.FromResult(new AuthorizationPolicyBuilder().RequireClaim(policyName).Build());
Microsoft.AspNetCore.Mvc.Core.Test (7)
ApplicationModels\AuthorizationApplicationModelProviderTest.cs (3)
77options.Value.AddPolicy("Base", policy => policy.RequireClaim("Basic").RequireClaim("Basic2")); 78options.Value.AddPolicy("Derived", policy => policy.RequireClaim("Derived"));
Authorization\AuthorizeFilterTest.cs (4)
515.RequireClaim("Claim1") 519.RequireClaim("Claim2") 540.RequireClaim("Claim1") 544.RequireClaim("Claim2")
Microsoft.AspNetCore.Mvc.RazorPages.Test (3)
ApplicationModels\AuthorizationPageApplicationModelProviderTest.cs (3)
111options.Value.AddPolicy("Base", policy => policy.RequireClaim("Basic").RequireClaim("Basic2")); 112options.Value.AddPolicy("Derived", policy => policy.RequireClaim("Derived"));
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (2)
Startup.cs (2)
41policy.RequireClaim(ClaimTypes.NameIdentifier); 46policy.RequireClaim(ClaimTypes.Name);
Microsoft.AspNetCore.SignalR.Tests (3)
HubConnectionHandlerTests.cs (3)
2199policy.RequireClaim(ClaimTypes.NameIdentifier); 2235policy.RequireClaim(ClaimTypes.NameIdentifier); 2335policy.RequireClaim(ClaimTypes.NameIdentifier);
SecurityWebSite (6)
StartupWithGlobalAuthFilter.cs (2)
23options.AddPolicy("RequireClaimA", policy => policy.RequireClaim("ClaimA")); 24options.AddPolicy("RequireClaimB", policy => policy.RequireClaim("ClaimB"));
StartupWithGlobalAuthFilterWithoutEndpointRouting.cs (2)
23options.AddPolicy("RequireClaimA", policy => policy.RequireClaim("ClaimA")); 24options.AddPolicy("RequireClaimB", policy => policy.RequireClaim("ClaimB"));
StartupWithGlobalDenyAnonymousFilterWithUseMvc.cs (2)
24options.AddPolicy("RequireClaimA", policy => policy.RequireClaim("ClaimA")); 25options.AddPolicy("RequireClaimB", policy => policy.RequireClaim("ClaimB"));
SignalR.Client.FunctionalTestApp (1)
Startup.cs (1)
52policy.RequireClaim(ClaimTypes.NameIdentifier);