Skip to content

Commit

Permalink
fix: decode does not handle verify param anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
PrettyWood committed Oct 7, 2021
1 parent b297546 commit c3f0c52
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion toucan_connectors/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def oauth2_oidc(*args, **kwargs) -> Session:
"""
id_token = kwargs['id_token']
# check that the id_token is not expired
decoded = jwt.decode(kwargs['id_token'], verify=False, options={'verify_signature': False})
decoded = jwt.decode(kwargs['id_token'], options={'verify_signature': False})
if datetime.fromtimestamp(decoded['exp']) < datetime.now():
response = requests.post(
kwargs['token_endpoint'],
Expand Down
1 change: 0 additions & 1 deletion toucan_connectors/snowflake/snowflake_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ def _refresh_oauth_token(self):
if self.token_endpoint and self.refresh_token:
access_token = jwt.decode(
self.access_token,
verify=False,
options={'verify_signature': False},
)
if datetime.fromtimestamp(access_token['exp']) < datetime.now():
Expand Down

0 comments on commit c3f0c52

Please sign in to comment.