Skip to content

Commit

Permalink
fix: fix jwt expiry check
Browse files Browse the repository at this point in the history
(cherry picked from commit d71e279)

When upgrading ACA-Py and using old JWTs that did not contain the expiry
information, is becomes no longer possible to use those JWTs at all.
Since the JWT cannot be modified by the end user, I see no point in
rejecting all JWTs that do not contain expiry information.

Signed-off-by: Colton Wolkins (Indicio work address) <colton@indicio.tech>
  • Loading branch information
ctomc authored and TheTechmage committed Jul 28, 2022
1 parent 4b1fa13 commit dbc2207
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aries_cloudagent/multitenant/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ async def get_profile_for_token(

extra_settings["wallet.key"] = wallet_key

if wallet.jwt_iat and wallet.jwt_iat != iat:
if wallet.jwt_iat and iat is not None and wallet.jwt_iat != iat:
raise MultitenantManagerError("Token not valid")

profile = await self.get_wallet_profile(context, wallet, extra_settings)
Expand Down

0 comments on commit dbc2207

Please sign in to comment.