Skip to content

Dynamic token refresh margin#3

Merged
philon-msft merged 4 commits into
mainfrom
philon-msft/dynamic-refresh-margin
Jun 1, 2023
Merged

Dynamic token refresh margin#3
philon-msft merged 4 commits into
mainfrom
philon-msft/dynamic-refresh-margin

Conversation

@philon-msft

Copy link
Copy Markdown
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

Comment thread src/AzureCacheOptions.cs

@lsannicolas lsannicolas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Overall, changes look good.

Comment thread src/AzureCacheOptions.cs Outdated
Comment thread src/Microsoft.Azure.StackExchangeRedis.csproj Outdated
@philon-msft philon-msft merged commit 2ca6c78 into main Jun 1, 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.

3 participants