-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refresh JWKS in background when the cached JWKS expires rather than b…
…lock for refresh Previously, whenever the cached JWKS expired there would be a block until the request has completed and the cache has been updated. Now, when the JWKS cache expires the refresh is triggered in the background and the cached JWKS will continue to be returned until the background refresh has been completed. If that background refresh succeeds then the cache will be updated, if it errors then the cached JWKS will be deleted and on the next call of KeyFunc the JWKS refresh will be attempted again, which (if the error persists) would raise the error. This now means that the only time KeyFunc will block is in the instance where there is no JWKS for an issuer, when a cached JWKS expires we will no longer block
- Loading branch information
1 parent
34d8362
commit 3cff0b1
Showing
4 changed files
with
118 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters