Open UFOMelkor opened 6 years ago
@UFOMelkor
Adding an implementation of AuthorizationService
in the bundle is a good idea, but I would do it for 1.1 release, not targeting upcoming 1.0 release, as this would only delay the final release (and it's not a strict requirement).
about enabling guards per bus: the guards are plugins, so it should already be possible to add them simply
convert Prooph\ServiceBus\Plugin\Guard\UnauthorizedException
into Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
- same as above, I would target this for 1.1 release.
The service-bus has two plugins to support authorization, the RouteGuard and the FinalizeGuard. Both rely on a simple interface AuthorizationService.
Any thoughts about …
AuthorizationService
adapter forSymfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface
Prooph\ServiceBus\Plugin\Guard\UnauthorizedException
intoSymfony\Component\HttpKernel\Exception\AccessDeniedHttpException
if it is not caught in the controller.