Closed Yash-Bhandari closed 2 years ago
This should be superseded by #37, in case we want to focus on a single PR to fix this issue.
should be closed in favor of https://github.com/labd/django-cognito-jwt/pull/41#issue-1077075772
As mentioned by @MichelML this will be resolved in the upcoming 0.0.4 release.
Trying to validate an expired token did not raise a TokenError. Instead there would be an invalid import error: File ".../django_cognito_jwt/validator.py", line 68, in validate except (jwt.InvalidTokenError, jwt.ExpiredSignature, jwt.DecodeError) as exc: AttributeError: module 'jwt' has no attribute 'ExpiredSignature'
As can be seen here, the jwt package actually exports ExpiredSignatureError, not ExpiredSignature ctrl+f "expired" : https://pyjwt.readthedocs.io/en/latest/usage.html