Authorization Service¶
authorization_service
¶
Inbound port for authorization and permission checking.
AuthorizationService
¶
Bases: ABC
Abstract service that authorizes user actions.
Source code in src/forging_blocks/application/ports/inbound/authorization_service.py
check_permission(context: AuthorizationContext, permission: Permission) -> bool
abstractmethod
async
¶
Evaluate whether permission is granted in context.
check_resource_permission(context: AuthorizationContext, resource: str, action: str) -> bool
abstractmethod
async
¶
Evaluate whether action on resource is permitted in context.