-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Refactor JWT cache code. Mostly moving into a separate class that will strictly handle cache logic. Add an abstract JwtCache class so it's easy to extend to an eventual remote redis call. - Introduce `cachetools`. - Add `JWT_CACHING_TTL_SECONDS` which allows us to specify when tokens should be evicted. Before, it was possible that Confidant would provision expired JWTs from its custom cache.
- Loading branch information
1 parent
96c5f5b
commit 7df3c5b
Showing
7 changed files
with
216 additions
and
159 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -200,5 +200,8 @@ pyjwt>=2.6.0 | |
jwcrypto | ||
cerberus | ||
|
||
# caching jwt | ||
cachetools==5.2.0 | ||
|
||
# for typing | ||
mypy |
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
Oops, something went wrong.