Skip to content

Add cache_ttl param to AsymmetricSignatureVerifier - #490

Merged
adamjmcgrath merged 1 commit into
auth0:masterfrom
matei-radu:489/set-JwksFetcher-ttl-through-AsymmetricSignatureProvier
May 2, 2023
Merged

adamjmcgrath merged 1 commit into
auth0:masterfrom
matei-radu:489/set-JwksFetcher-ttl-through-AsymmetricSignatureProvier

Conversation

@matei-radu

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

Copy link
Copy Markdown
Contributor

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

@adamjmcgrath adamjmcgrath left a comment

Copy link
Copy Markdown
Contributor

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
@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