-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Unable to use OAuth2ClientJackson2Module on its own #12190
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
Comments
Not directly related to the bug, but in my Spring Boot project I register the modules with (it seems to work well):
|
Thanks for reaching out, @buckett!
It feels like this is a question that would be better suited to Stack Overflow. We prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it).
Enhancing the documentation is always welcome! If you'd like to submit a PR, I'd be happy to review it. Since your provided sample does not register a mixin for |
@sjohnr I was really asking "Should
Both of these would ideally result in a code change which is why I'd started the discussion here as I'd normally create before coming in with a PR. |
Hi @buckett!
As mentioned above, I believe the error message points to a mis-configuration and answers this question.
Thanks for clarifying. It's been a while since I reviewed the javadoc on these classes, so it's good to get feedback that it would benefit from an enhancement. I'm happy to see an issue for improving the docs, or in this case I would also be happy to review a PR without an accompanying issue (since we can link to this discussion as the driver for the PR). Given that the issue you reported indicates a bug, and I don't believe this to be a bug, I'll leave this issue closed as-is. If you aren't able to submit a PR, would you mind opening a new issue for the documentation enhancement? |
Describe the bug
Adding the
OAuth2ClientJackson2Module
to anObjectMapper
and attempting to roundtrip (serialise to JSON string then parse) a ClientRegistration fails with:Linking to #4370 as the error message does.
To Reproduce
Run sample test code with Spring Security 5.7.3.
Expected behavior
I'm not sure if the class is intended to work on it's own, or if it should always be used in conjunction with other Spring Security modules that are loaded with
SecurityJackson2Modules.getModules(getClass().getClassLoader())
. If it isn't supposed to work on it's own then having this in the JavaDoc would be helpful.Sample
The text was updated successfully, but these errors were encountered: