Skip to content
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

Make Oauth2Authorization.Token constructor public #1544

Closed
balajimurugaiya opened this issue Feb 20, 2024 · 1 comment
Closed

Make Oauth2Authorization.Token constructor public #1544

balajimurugaiya opened this issue Feb 20, 2024 · 1 comment
Assignees
Labels
status: declined A suggestion or change that we don't feel we should currently apply

Comments

@balajimurugaiya
Copy link

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.

@balajimurugaiya balajimurugaiya added the type: enhancement A general enhancement label Feb 20, 2024
@jgrandja
Copy link
Collaborator

@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-1019 gh-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.

@jgrandja jgrandja self-assigned this Feb 26, 2024
@jgrandja jgrandja added status: declined A suggestion or change that we don't feel we should currently apply and removed type: enhancement A general enhancement labels Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

No branches or pull requests

2 participants