-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Allow extension and/or modification of success/error response handlers within Filter
s
#1369
Comments
Filter
sFilter
s
Filter
sFilter
s
Thanks for the detailed analysis @ddubson ! As far as the approach goes, I think we should start exposing For the first iteration, let's create a new
For the second iteration, let's see if we can come up with a hook in the new
As far as exposing |
…r response handler fixes spring-projectsgh-1369
…r response handler fixes spring-projectsgh-1369
…r response handler fixes spring-projectsgh-1369
The purpose of this design charter is to evaluate a strategy for allowing extension and/or modification of success and error response handlers within a set of applicable server endpoints (implemented within
Filter
classes).The present state of success and error handlers is that they are implemented mostly as private instance methods within respective
Filter
classes. (List ofFilter
classes below).Success response handlers
Success response handlers should not be fully modifiable as they contain logic critical to a stable operating auth server, but they should be customizable at designated points. The designated points should be decided in advance with the criteria being: should a developer be able to modify this behavior? The approach of allowing the developer to inject
Consumer<T>
classes in order to extend a certain logic of a handler may be an option.Success response handlers may be extendable at designated points. A developer should be able to inject their own application logic (e.g. for logging purposes) as needed — after the critical default success response handler.
Error response handlers
Error response handlers are much lighter than success response handlers as they contain less logic and overall have a smaller footprint for any given
Filter
response.For example, the following is a subset of
Filter
s contain the same logic for error response handling which may be abstracted into a consistent pattern for a default error response handler:OAuth2TokenIntrospectionEndpointFilter
OAuth2TokenRevocationEndpointFilter
OAuth2TokenEndpointFilter
OAuth2DeviceAuthorizationEndpointFilter
Error response handlers may be extendable at designated points. A developer should be able to inject their own application logic (i.e. for logging purposes) as needed — after the critical default error response handler.
Potential approaches
Potential approaches for affording extensions of response handlers:
Potential approaches for affording modifications of default response handlers:
Consumer<T>
implementationsAppendix
The following is a list of all
Filter
classesOAuth2AuthorizationEndpointFilter
OAuth2ClientAuthenticationFilter
OAuth2DeviceAuthorizationEndpointFilter
OAuth2DeviceVerificationEndpointFilter
OAuth2TokenEndpointFilter
OAuth2TokenIntrospectionEndpointFilter
OAuth2TokenRevocationEndpointFilter
OidcUserInfoEndpointFilter
OidcClientRegistrationEndpointFilter
OidcLogoutEndpointFilter
NimbusJwkSetEndpointFilter
OAuth2AuthorizationServerMetadataEndpointFilter
OidcProviderConfigurationEndpointFilter
Use cases
Related open issues
The text was updated successfully, but these errors were encountered: