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

refresh token fix for DelegatedTokenCredentials & UserTokenCredentials #632

Merged
merged 2 commits into from
Sep 12, 2019

Conversation

jianghaolu
Copy link
Contributor

@jianghaolu jianghaolu commented Sep 12, 2019

@ViktorFefilov
resolves #625

ViktorFefilovF5 and others added 2 commits September 12, 2019 11:17
- current implementation is using RefreshTokenClient for refresh token but RefreshTokenClient doesnt use client_secret
- changed to using AuthenticationContext as in acquireNewAccessToken

bug flow:
- get authorization_code
- initialize DelegatedTokenCredentials with authorization_code
- do request to resource A with DelegatedTokenCredentials (OK)
- do request to resource B with DelegatedTokenCredentials (fail with message OAuth2 Authorization code was already redeemed)

But actually bug is not about authorization_code. First exception occurs in RefreshTokenClient in method refreshToken but he just returns null in catch block and by this reason DelegatedTokenCredentials is trying to use authorization_code to acquire access token
@jianghaolu jianghaolu changed the title fix for DelegatedTokenCredentials & UserTokenCredentials refresh token fix for DelegatedTokenCredentials & UserTokenCredentials Sep 12, 2019
@jianghaolu jianghaolu merged commit 8090389 into Azure:master Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RefreshTokenClient doesnt use client_secret and that causes error in DelegatedTokenClient
2 participants