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

Implement a per-resource token cache for AutoRefreshingTokenCredential #1229

Merged
merged 3 commits into from
Feb 28, 2023

Conversation

johnbatty
Copy link
Contributor

The current implementation of AutoRefreshingTokenCredential caches a single token. This does not work if the same credential is used for multiple resources, as tokens are specific to a given resource.

This PR updates AutoRefreshingTokenCredential to cache tokens per-resource. This is implemented using a HashMap indexed by the resource name.

Fixes: #1225

@demoray demoray merged commit 7b726af into Azure:main Feb 28, 2023
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.

AutoRefreshingTokenCredential token override issue
2 participants