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

Add cache_ttl param to AsymmetricSignatureVerifier #490

Merged
merged 1 commit into from
May 2, 2023
Merged

Add cache_ttl param to AsymmetricSignatureVerifier #490

merged 1 commit into from
May 2, 2023

Conversation

matei-radu
Copy link
Contributor

@matei-radu matei-radu commented May 1, 2023

Changes

This PR adds the parameter cache_ttl to AsymmetricSignatureVerifier. This new, optional parameter allows setting the cache TTL for the underlying JwksFetcher. This allows caching the JWK set for more (or less) time than the default 600 seconds.

AsymmetricSignatureVerifier had to be moved below JwksFetcher because it now references it, so the latter has to be defined earlier in the file.

This closes #489.

References

Testing

  • This change adds unit test coverage
  • This change adds integration test coverage
  • This change has been tested on the latest version of the platform/language (Python 3.11.2)

Checklist

This new, optional parameter allows setting the cache TTL for the
underlying `JwksFetcher`. This allows caching the JWK set for more (or
less) time than the default 600 seconds.

`AsymmetricSignatureVerifier` had to be moved below `JwksFetcher`
because it now references it, so the latter has to be defined earlier in
the file.
@matei-radu matei-radu requested a review from a team as a code owner May 1, 2023 11:21
Copy link
Contributor

@adamjmcgrath adamjmcgrath left a comment

Choose a reason for hiding this comment

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

Thanks @matei-radu

@adamjmcgrath adamjmcgrath merged commit c0f6fd4 into auth0:master May 2, 2023
7 checks passed
@adamjmcgrath adamjmcgrath mentioned this pull request May 2, 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.

Allow setting the cache TTL for JwksFetcher through AsymmetricSignatureVerifier
2 participants