-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I get this error when I try to run exchangeJWTforBearerToken:
Error in py_call_impl(callable, dots$args, dots$keywords) :
AttributeError: 'str' object has no attribute 'decode'
I traced this back to the version of pyJWT I'm using (2.0.1) - I don't get this error if I downgrade to version 1.7.1 of that package. However, that's not possible for me because pyjwt 1.7.1 isn't compatible with the version of python I'm using.
It looks like if we remove line 69 (the jwt.decode line below) of ExchangeJWT.py, I can run the file and retrieve the Bearer Token successfully:
# create JSON Web Token, signing it with the private key.
jwt_token = jwt.encode(payload, priv_key, algorithm='RS256')
# decode bytes into string
#jwt_token = jwt.decode(jwt_token, priv_key, algorithms=['RS256'])
Would it work to have this package require pyJWT 2.0.0 or higher (jpadilla/pyjwt#587) and make that change to ExchangeJWT.py?
Metadata
Metadata
Assignees
Labels
No labels