Class AllScopedOperationsHandler
- Namespace
- Arc4u.Authorization
- Assembly
- Arc4u.Authorization.dll
Handles AllScopedOperationsRequirement by verifying that the current principal is granted all of the required scoped operations (AND logic).
[Export(typeof(IAuthorizationHandler))]
[Scoped]
public sealed class AllScopedOperationsHandler : AuthorizationHandler<AllScopedOperationsRequirement>, IAuthorizationHandler
- Inheritance
-
AllScopedOperationsHandler
- Implements
- Inherited Members
Remarks
Registered with scoped lifetime by AddScopedOperationsPolicy(IServiceCollection, IEnumerable<string>, IEnumerable<Operation>); the ExportAttribute/ScopedAttribute pair additionally exposes the handler to the Arc4u dependency-injection scanner. If the principal is null (e.g. on Blazor WebAssembly before authentication), the requirement fails immediately.
Constructors
AllScopedOperationsHandler(IApplicationContext)
Handles AllScopedOperationsRequirement by verifying that the current principal is granted all of the required scoped operations (AND logic).
public AllScopedOperationsHandler(IApplicationContext applicationContext)
Parameters
applicationContextIApplicationContext
Remarks
Registered with scoped lifetime by AddScopedOperationsPolicy(IServiceCollection, IEnumerable<string>, IEnumerable<Operation>); the ExportAttribute/ScopedAttribute pair additionally exposes the handler to the Arc4u dependency-injection scanner. If the principal is null (e.g. on Blazor WebAssembly before authentication), the requirement fails immediately.
Methods
HandleRequirementAsync(AuthorizationHandlerContext, AllScopedOperationsRequirement)
Makes a decision if authorization is allowed based on a specific requirement.
protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, AllScopedOperationsRequirement requirement)
Parameters
contextAuthorizationHandlerContextThe authorization context.
requirementAllScopedOperationsRequirementThe requirement to evaluate.