Change Immutability for OAuth2AuthorizedClient #8905
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
status: duplicate
A duplicate of another issue
Expected Behavior
OAuth2AuthorizedClient and its nested classes are designed immutable. Can you change this behaviour?
Current Behavior
There are currently only "final" fields, full-args constructor and getter methods.
Context
I want to store this class in Redis and it's fine by using Jackson. But, there is exception during Deserialization, because it first creates object with no-arg constructor, then uses setter methods. Because of that, I can't retrieve record from Redis.
There is an option provided by Jackson to solve this. mix-in classes. (https://github.com/FasterXML/jackson-docs/wiki/JacksonMixInAnnotations)
I have created a mix-in class for OAuth2AuthorizedClient, but this time, its inner classes need their own mixin classes. so there will be some many dummy mixin classes and configurations, so it will causes complexity.
The text was updated successfully, but these errors were encountered: