-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Improve customization of DefaultOAuth2UserService
to handle other content types
#9629
Comments
@knoobie Take a look at the implementations of We could apply the same pattern where we extract the response processing logic in Makes sense? |
@jgrandja Interesting idea! Do you mind if I take a look at it, or do you wanna do it? |
@knoobie It would be great if you could submit a PR for this. |
@jgrandja Created a first draft here knoobie@f1a86cf - using Currently only two tests are failing and I'm struggling to understand why. |
@sjohnr Do you think your draft is revisited and hopefully to be included in 6.0? |
Hi @knoobie! Thanks for checking in, I'm very sorry not to have updated you before now. At this time, the team is prioritizing breaking changes only, and until we can work through that list of issues, we wouldn't be prioritizing other enhancements for 6.0. If there's time after, we could certainly look at it, but the schedule is pretty tight. The good news is that if this issue misses 6.0, it could still go into 6.1. |
Expected Behavior
DefaultOAuth2UserService
can be extended to e.g. allow for custom body parsing to handleapplication/jwt
for signed and/or encrypted UserInfo Response.Rough draft:
We are open for other solutions as well and happy to contribute, if that's something you see worth it as addition to spring-security.
Current Behavior
DefaultOAuth2UserService
has to be copied and "rewritten" - becausegetResponse()
is called insideloadUser(OAuth2UserRequest userRequest)
which forces us to re-create the wholeloadUser(OAuth2UserRequest userRequest)
method.spring-security/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/userinfo/DefaultOAuth2UserService.java
Lines 88 to 117 in a325216
Context
Related to #9583
The text was updated successfully, but these errors were encountered: