Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw exception instead of sending 401 response in default middleware definition #9

Open
clement-michelet opened this issue Jun 6, 2018 · 1 comment

Comments

@clement-michelet
Copy link

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.

@geggleto
Copy link
Owner

geggleto commented Jun 6, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants