27 references to Requirements
BasicWebSite (1)
ConfigureAuthPolicies.cs (1)
28
policy.
Requirements
.Add(Operations.Edit);
Microsoft.AspNetCore.Authorization (11)
AuthorizationPolicyBuilder.cs (11)
45
/// Gets or sets a list authentication schemes the <see cref="AuthorizationPolicyBuilder.
Requirements
"/>
72
/// <see cref="AuthorizationPolicyBuilder.
Requirements
"/> for this instance.
82
Requirements
.Add(req);
126
Requirements
.Add(new ClaimsAuthorizationRequirement(claimType, allowedValues));
140
Requirements
.Add(new ClaimsAuthorizationRequirement(claimType, allowedValues: null));
167
Requirements
.Add(new RolesAuthorizationRequirement(roles));
180
Requirements
.Add(new NameAuthorizationRequirement(userName));
190
Requirements
.Add(_denyAnonymousAuthorizationRequirement);
203
Requirements
.Add(new AssertionRequirement(handler));
216
Requirements
.Add(new AssertionRequirement(handler));
229
return new AuthorizationPolicy(
Requirements
, AuthenticationSchemes.Distinct());
Microsoft.AspNetCore.Authorization.Test (13)
AuthorizationEndpointConventionBuilderExtensionsTests.cs (2)
151
builder.RequireAuthorization(policyBuilder => policyBuilder.
Requirements
.Add(requirement));
177
builder.RequireAuthorization(policyBuilder => policyBuilder.
Requirements
.Add(requirement));
DefaultAuthorizationServiceTests.cs (10)
103
services.AddAuthorizationBuilder().AddPolicy("Custom", policy => policy.
Requirements
.Add(new CustomRequirement()));
129
.AddPolicy("Custom", policy => policy.
Requirements
.Add(new CustomRequirement()))
181
services.AddAuthorizationBuilder().AddPolicy("Custom", policy => policy.
Requirements
.Add(new CustomRequirement()));
643
options.AddPolicy("Custom", policy => policy.
Requirements
.Add(new CustomRequirement()));
664
options.AddPolicy("Custom", policy => policy.
Requirements
.Add(new CustomRequirement()));
705
options.AddPolicy("Passthrough", policy => policy.
Requirements
.Add(new PassThroughRequirement(shouldSucceed)));
1203
p.
Requirements
.Add(new LogRequirement());
1204
p.
Requirements
.Add(new LogRequirement());
1237
p.
Requirements
.Add(new LogRequirement());
1238
p.
Requirements
.Add(new LogRequirement());
PassThroughAuthorizationHandlerTests.cs (1)
35
options.AddPolicy("Self", policy => policy.
Requirements
.Add(willFail));
Microsoft.AspNetCore.Http.Connections.Tests (1)
MapConnectionHandlerTests.cs (1)
41
endpoints => endpoints.RequireAuthorization(policy1).RequireAuthorization(pb => pb.
Requirements
.Add(req))))
Microsoft.AspNetCore.SignalR.Tests (1)
HubConnectionHandlerTests.cs (1)
3732
policy.
Requirements
.Add(new DelayRequirement(tcsService));