-
Notifications
You must be signed in to change notification settings - Fork 255
Closed
Labels
Description
>>> key = b'key'
>>> token = jwt.encode({'key': 'value'}, key, algorithm='HS256')
>>> jwt.decode(token, key, algorithms=['HS256'])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/lib/python3.5/site-packages/jose/jwt.py", line 134, in decode
payload = jws.verify(token, key, algorithms, verify=verify_signature)
File "/lib/python3.5/site-packages/jose/jws.py", line 75, in verify
_verify_signature(signing_input, header, signature, key, algorithms)
File "/lib/python3.5/site-packages/jose/jws.py", line 260, in _verify_signature
keys = _get_keys(key)
File "/lib/python3.5/site-packages/jose/jws.py", line 227, in _get_keys
if 'keys' in key:
TypeError: a bytes-like object is required, not 'str'
I think either both should work or both should fail.
Reactions are currently unavailable