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

Decouple error responses from exception #1113

Open
wants to merge 9 commits into
base: 9.0.0-WIP
Choose a base branch
from

Conversation

lordrhodos
Copy link

@lordrhodos lordrhodos commented Apr 20, 2020

This PR decouples the generation of the error responses from the OAuthServerException by moving the function to a new ExceptionResponseHandlerInterface with a default ExceptionResponseHandler implementation.

The handler gets injected into the authorization and resource server and is used via a ::generateHttpRespone proxy method.

This way required changes are minized while the libraries error responses can be easily overridden or adapted. This change is motivated by adding support for translated error response payloads in a second step.

Relates to #972, #884, #747

@strongholdmedia
Copy link

I find this idea an awesome one.

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

Successfully merging this pull request may close these issues.

2 participants