Skip to content

Commit

Permalink
sfc-gh-bhess#6 cast leeway to int
Browse files Browse the repository at this point in the history
  • Loading branch information
viktortoenkoel committed Sep 1, 2023
1 parent f1e94e0 commit 553cd99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion st_oauth/st_oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def validate_token(token, config):
signing_key = jwks_client(config['jwks_uri']).get_signing_key_from_jwt(token['access_token'])
try:
audience = config['audience'] if 'audience' in config else None
leeway = config['leeway'] if 'leeway' in config else 0
leeway = int(config['leeway']) if 'leeway' in config else 0
data = jwt.decode(token['access_token'], signing_key.key, algorithms=["RS256"], audience=audience, leeway=leeway)
except (jwt.exceptions.ExpiredSignatureError):
return False, 'Expired'
Expand Down

0 comments on commit 553cd99

Please sign in to comment.