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

Dynamic token refresh margin #3

Merged
merged 4 commits into from
Jun 1, 2023

Conversation

philon-msft
Copy link
Contributor

Improve support for AAD tenants where token lifetimes that are configure for intervals other than 24 hours.

  • Change the token refresh margin from a hardcoded 4h to user-configurable lambda on AzureCacheOptions
  • Default refresh margin to 75% of token lifetime. For example a token with a 24h lifetime will be eligible for refresh after 18h

Copy link
Collaborator

@lsannicolas lsannicolas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, changes look good.

src/AzureCacheOptions.cs Outdated Show resolved Hide resolved
@philon-msft philon-msft merged commit 2ca6c78 into main Jun 1, 2023
1 check passed
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.

None yet

3 participants