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