diff --git a/aries_cloudagent/multitenant/base.py b/aries_cloudagent/multitenant/base.py index 03fbb7a515..6d07b52867 100644 --- a/aries_cloudagent/multitenant/base.py +++ b/aries_cloudagent/multitenant/base.py @@ -321,7 +321,7 @@ async def create_auth_token( def get_wallet_details_from_token(self, token: str) -> Tuple[str, str]: """Get the wallet_id and wallet_key from provided token.""" jwt_secret = self._profile.context.settings.get("multitenant.jwt_secret") - token_body = jwt.decode(token, jwt_secret, algorithms=["HS256"]) + token_body = jwt.decode(token, jwt_secret, algorithms=["HS256"], leeway=1) wallet_id = token_body.get("wallet_id") wallet_key = token_body.get("wallet_key") return wallet_id, wallet_key @@ -360,7 +360,7 @@ async def get_profile_for_token( jwt_secret = self._profile.context.settings.get("multitenant.jwt_secret") extra_settings = {} - token_body = jwt.decode(token, jwt_secret, algorithms=["HS256"]) + token_body = jwt.decode(token, jwt_secret, algorithms=["HS256"], leeway=1) wallet_id = token_body.get("wallet_id") wallet_key = token_body.get("wallet_key") diff --git a/requirements.txt b/requirements.txt index b0d46ae66f..88841288ff 100644 --- a/requirements.txt +++ b/requirements.txt @@ -20,7 +20,7 @@ packaging~=23.1 portalocker~=2.7.0 prompt_toolkit~=2.0.9 pydid~=0.3.6 -pyjwt~=2.4.0 +pyjwt~=2.8.0 pyld~=2.0.3 pynacl~=1.5.0 python-dateutil~=2.8.1