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

Pass old Credentials to CredentialRefreshListener when token refreshed #369

Open
bedla opened this issue Sep 15, 2019 · 0 comments
Open
Labels
type: question Request for information or clarification. Not an issue.

Comments

@bedla
Copy link

bedla commented Sep 15, 2019

Hi,
I think that order of setting new refresh token and calling listener should be switched in method com.google.api.client.auth.oauth2.Credential#refreshToken.
Currently first is setFromTokenResponse called and second refreshListener.onTokenResponse is called. Method setFromTokenResponse changes currently Credential instance and this side-effected instance is passed to onTokenResponse.
My use-case is that I want to check/"pass somewhere" old tokens in listener and because of this order I am unable to get valid old tokens from Credential instance.
Is this behaviour intentional or I found bug? I can create PR.
Thx,
Ivos

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Sep 16, 2019
@chingor13 chingor13 added the type: question Request for information or clarification. Not an issue. label Sep 18, 2019
@yoshi-automation yoshi-automation removed the triage me I really want to be triaged. label Sep 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

3 participants