Skip to content

Commit

Permalink
Jwt cache config (#516)
Browse files Browse the repository at this point in the history
* adding in the params to turn on/off jwks caching

Signed-off-by: thor wolpert <[email protected]>

* altering config to set duration to an int, werkzeug caching requires typed comparison.

Signed-off-by: thor wolpert <[email protected]>

* altering config to set duration to an int, werkzeug caching requires typed comparison.

Signed-off-by: thor wolpert <[email protected]>
  • Loading branch information
thorwolpert authored and kialj876 committed Feb 4, 2019
1 parent 2444795 commit e6737d0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ class Config(object):
JWT_OIDC_AUDIENCE = os.getenv('JWT_OIDC_AUDIENCE')
JWT_OIDC_CLIENT_SECRET = os.getenv('JWT_OIDC_CLIENT_SECRET')
JWT_OIDC_CACHING_ENABLED = os.getenv('JWT_OIDC_CACHING_ENABLED')
JWT_OIDC_JWKS_CACHE_TIMEOUT = os.getenv('JWT_OIDC_JWKS_CACHE_TIMEOUT')
try:
JWT_OIDC_JWKS_CACHE_TIMEOUT = int(os.getenv('JWT_OIDC_JWKS_CACHE_TIMEOUT'))
except:
JWT_OIDC_JWKS_CACHE_TIMEOUT = 300


TESTING = False,
DEBUG = False
Expand Down

0 comments on commit e6737d0

Please sign in to comment.