5 instantiations of OperationAuthorizationRequirement
BasicWebSite (1)
Operations.cs (1)
10public static OperationAuthorizationRequirement Edit = new OperationAuthorizationRequirement { Name = "Edit" };
Microsoft.AspNetCore.Authorization.Test (4)
DefaultAuthorizationServiceTests.cs (3)
803public static OperationAuthorizationRequirement Edit = new OperationAuthorizationRequirement { Name = "Edit" }; 804public static OperationAuthorizationRequirement Create = new OperationAuthorizationRequirement { Name = "Create" }; 805public static OperationAuthorizationRequirement Delete = new OperationAuthorizationRequirement { Name = "Delete" };
OperationAuthorizationRequirementTests.cs (1)
12return new OperationAuthorizationRequirement()
22 references to OperationAuthorizationRequirement
BasicWebSite (3)
ManagerHandler.cs (2)
9public class ManagerHandler : AuthorizationHandler<OperationAuthorizationRequirement> 11protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, OperationAuthorizationRequirement requirement)
Operations.cs (1)
10public static OperationAuthorizationRequirement Edit = new OperationAuthorizationRequirement { Name = "Edit" };
Microsoft.AspNetCore.Authorization (1)
OperationAuthorizationRequirement.cs (1)
20return $"{nameof(OperationAuthorizationRequirement)}:Name={Name}";
Microsoft.AspNetCore.Authorization.Test (18)
DefaultAuthorizationServiceTests.cs (16)
803public static OperationAuthorizationRequirement Edit = new OperationAuthorizationRequirement { Name = "Edit" }; 804public static OperationAuthorizationRequirement Create = new OperationAuthorizationRequirement { Name = "Create" }; 805public static OperationAuthorizationRequirement Delete = new OperationAuthorizationRequirement { Name = "Delete" }; 808public class ExpenseReportAuthorizationHandler : AuthorizationHandler<OperationAuthorizationRequirement, ExpenseReport> 810public ExpenseReportAuthorizationHandler(IEnumerable<OperationAuthorizationRequirement> authorized) 815private readonly IEnumerable<OperationAuthorizationRequirement> _allowed; 817protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, OperationAuthorizationRequirement requirement, ExpenseReport resource) 827public class SuperUserHandler : AuthorizationHandler<OperationAuthorizationRequirement> 829protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, OperationAuthorizationRequirement requirement) 845services.AddSingleton<IAuthorizationHandler>(new ExpenseReportAuthorizationHandler(new OperationAuthorizationRequirement[] { Operations.Edit })); 863public class NotCalledHandler : AuthorizationHandler<OperationAuthorizationRequirement, string> 865protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, OperationAuthorizationRequirement requirement, string resource) 871public class EvenHandler : AuthorizationHandler<OperationAuthorizationRequirement, int> 873protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, OperationAuthorizationRequirement requirement, int id) 931services.AddSingleton<IAuthorizationHandler>(new ExpenseReportAuthorizationHandler(new OperationAuthorizationRequirement[] { Operations.Edit })); 948services.AddSingleton<IAuthorizationHandler>(new ExpenseReportAuthorizationHandler(new OperationAuthorizationRequirement[] { Operations.Edit }));
OperationAuthorizationRequirementTests.cs (2)
10private OperationAuthorizationRequirement CreateRequirement(string name) 22var requirement = CreateRequirement("Custom");