Skip to content

Commit 1f80a03

Browse files
authored
Merge pull request #14 from Authress/improve-token-verify-throw
Throw Exception when token is invalid but not expired.
2 parents c8840c8 + bb07ecd commit 1f80a03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

authress/api/token_verifier.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def verify_token(self, authressCustomDomain, token, options=None):
5555

5656
try:
5757
return jwt.decode(authenticationToken, jwt.api_jwk.PyJWK.from_dict(jwk).key, algorithms=['EdDSA'], options = { 'verify_aud': False })
58-
except jwt.ExpiredSignatureError:
58+
except:
5959
raise Exception("Unauthorized", "Token is invalid")
6060

6161
def get_public_key(self, jwkKeyListUrl, kid):

0 commit comments

Comments
 (0)