Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade/pyjwt support #37

Closed
wants to merge 3 commits into from
Closed

Conversation

monkut
Copy link

@monkut monkut commented Apr 21, 2021

fix update in pyjwt where jwt.ExpiredSignature was changed to jwt.ExpiredSignatureError.

    jwt_payload = token_validator.validate(jwt_token)
  File ".../site-packages/django_cognito_jwt/validator.py", line 68, in validate
    except (jwt.InvalidTokenError, jwt.ExpiredSignature, jwt.DecodeError) as exc:
rest_framework.request.WrappedAttributeError: module 'jwt' has no attribute 'ExpiredSignature'

@Vektrat
Copy link

Vektrat commented Apr 22, 2021

I can confirm this is broken, most likely since jpadilla/pyjwt@f690976 where they dropped deprecation support for the referenced error in this project

I think it'd also be a good idea to lock compatible versions in the requirements list

This PR would fix #34

@adamantike
Copy link

@mikedebock @mvantellingen, can you please review this change? The workaround in #34 is not an alternative if you want to use a newer version of libraries depending on pyjwt (e.g. latest versions of https://github.com/jazzband/djangorestframework-simplejwt require pyjwt>=2,<3)

@MichelML MichelML mentioned this pull request Dec 10, 2021
@MichelML
Copy link
Contributor

should be closed in favor of #41 (comment)

@mikedebock
Copy link
Member

As mentioned by @MichelML this will be resolved in the upcoming 0.0.4 release.

@mikedebock mikedebock closed this Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants