Allow version 1.7 of pyjwt (Please help!)#465
Allow version 1.7 of pyjwt (Please help!)#465unmonoqueteclea wants to merge 1 commit intojazzband:masterfrom unmonoqueteclea:master
Conversation
| has_pyjwt_client = True | ||
| except ImportError: | ||
| # For jwt<2.0 | ||
| has_pyjwt_client = False |
There was a problem hiding this comment.
This does not seem implemented yet?
|
|
||
|
|
||
| try: | ||
| # For jwt>=2.0 |
There was a problem hiding this comment.
Please try to install the different pyjwt versions. Thanks!
| self.payload['exp'] = aware_utcnow() + timedelta(days=1) | ||
| token_1 = jwt.encode(self.payload, SECRET, algorithm='HS256') | ||
|
|
||
| token_1 = jwt.encode(self.payload.copy(), SECRET, algorithm='HS256') |
There was a problem hiding this comment.
Is there a reason we need to copy now? If so, then please use a property instead.
|
@Andrew-Chen-Wang Closing this because allowing PyJWT<2 takes much more effort than |
|
@unmonoqueteclea if you are able to continue so long as you have time, I'd like to help guide. Thank you for the contribution thus far though! Additionally, I've re-opened this PR for visibility purposes. If anyone would like to continue this PR, open a draft PR and I'd be more than happy to help guide. |
|
Closing in favor of #536 I'm so sorry this took forever. I finally finished my exams 😭 |
This is the first step to allow version 1.7 of
pyjwt. [NOT READY FOR MERGE YET]All tests but one succeeded.
The test that fails is the one that uses
PyJWKCent, that was added inpyjwt2.0.Before I manually take that little class from
pyjwtand add it to this project,I would like to know your opinion.
I think that, if adding this class will ensure compatibility with all the libraries depending
on
pyjwt<2, it worths the effort.