You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected Behavior
Construct Oauth2Authorization.Token object without having to create a subclass to instantiate the Token object. Current Behavior
Oauth2Authorization.Token object cant be instantiated directly.
Context
This is an issue for me as I am serializing the Oauth2Authorization object using protobuf and each member of the Oauth2Authorization class uses a different serializer. Currently, to deserialize the Oauth2Authorization.Token object I am using the Builder class to construct an entire dummy Oauth2Authorization object and set the correct token and use the public Token getToken(Class tokenType) method to return the token I want. It would be much simpler if there is a public constructor for Oauth2Authorization.Token.
The text was updated successfully, but these errors were encountered:
@balajimurugaiya The OAuth2Authorization.Token constructor is not intended to be public.
I haven't used protobuf to serialize but there has been success in the community using Redis, MongoDb and JPA so it should also be possible with protobuf. See gh-1019gh-558 for additional details.
Another option is to create an intermediary version of OAuth2Authorization similar to the JPA implementation and then serialize that using protobuf.
I'm going to close this as the constructor was not designed to be exposed.
Expected Behavior
Construct Oauth2Authorization.Token object without having to create a subclass to instantiate the Token object.
Current Behavior
Oauth2Authorization.Token object cant be instantiated directly.
Context
This is an issue for me as I am serializing the Oauth2Authorization object using protobuf and each member of the Oauth2Authorization class uses a different serializer. Currently, to deserialize the Oauth2Authorization.Token object I am using the Builder class to construct an entire dummy Oauth2Authorization object and set the correct token and use the public Token getToken(Class tokenType) method to return the token I want. It would be much simpler if there is a public constructor for Oauth2Authorization.Token.
The text was updated successfully, but these errors were encountered: