I'm using this library and implemented attribute based access controll with laravels gate and policy framework. Therefore I need to check authorisation inside the action callback methods sometimes. To get a more detailed response than just http status 400 on authorisation failure I implemented a ForbiddenException that triggers a 403 forbidden response.
Usage of this exception is totaly optional but I think providing it would be quite nice for people who need to implement authorisation in their own action callback methods. If there is a better way how this can be done I would be happy to receive some feedback.
I'm using this library and implemented attribute based access controll with laravels gate and policy framework. Therefore I need to check authorisation inside the action callback methods sometimes. To get a more detailed response than just http status 400 on authorisation failure I implemented a ForbiddenException that triggers a 403 forbidden response.
Usage of this exception is totaly optional but I think providing it would be quite nice for people who need to implement authorisation in their own action callback methods. If there is a better way how this can be done I would be happy to receive some feedback.