python-jose icon indicating copy to clipboard operation
python-jose copied to clipboard

jws.verify type error

Open mattsuid opened this issue 9 years ago • 1 comments

When passing a jwt and key to jws.verify I am getting a type error stating that a bytes like object is required. I can verify the jwt with the key successfully on jwt.io, and am passing byte strings as my arguments.

This:

print(type(jwt))
print(type(key))

jws.verify(jwt, key, algorithms=['HS256'])

Results in this:

<class 'bytes'>
<class 'bytes'>
TypeError, a bytes-like object is required, not 'str'

mattsuid avatar Oct 13 '17 14:10 mattsuid

Might be fixed in #139.

blag avatar Apr 15 '19 09:04 blag