geggleto-acl
geggleto-acl copied to clipboard
Throw exception instead of sending 401 response in default middleware definition
The current behaviour of the middleware is to send a 401 response. To customize that behaviour, I have to copy/paste the middleware to change it.
The package update process is less easier because I have to check if the default middleware definition has change. Also, a lot of information is lost in the way out (who/when/where/why/...).
To change that, I suggest that the default middleware throws a custom exception (AccessDeniedException?) with all informations. It will enter into errorHandler
and allows to log or customize the expected response.
I'll be able to do some more updates on this repo within the next month.