geggleto-acl icon indicating copy to clipboard operation
geggleto-acl copied to clipboard

Throw exception instead of sending 401 response in default middleware definition

Open clement-michelet opened this issue 6 years ago • 1 comments

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.

clement-michelet avatar Jun 06 '18 13:06 clement-michelet

I'll be able to do some more updates on this repo within the next month.

geggleto avatar Jun 06 '18 14:06 geggleto