From 6a7e537931984ab481114557e985b459f4798fa5 Mon Sep 17 00:00:00 2001 From: kour1er <34779600+kour1er@users.noreply.github.com> Date: Tue, 28 May 2024 17:08:30 +0100 Subject: [PATCH] Update authlib_backend.py to add exception Added an additional check for BadSignatureError --- fastapi_jwt/jwt_backends/authlib_backend.py | 1 + 1 file changed, 1 insertion(+) diff --git a/fastapi_jwt/jwt_backends/authlib_backend.py b/fastapi_jwt/jwt_backends/authlib_backend.py index 780992e..522d6d2 100644 --- a/fastapi_jwt/jwt_backends/authlib_backend.py +++ b/fastapi_jwt/jwt_backends/authlib_backend.py @@ -43,5 +43,6 @@ def decode(self, token: str, secret_key: str) -> Optional[Dict[str, Any]]: authlib_jose_errors.InvalidClaimError, authlib_jose_errors.InvalidTokenError, authlib_jose_errors.DecodeError, + authlib_jose_errors.BadSignatureError, ) as e: raise BackendException(f"Invalid token: {e}")