1

I am trying to decode a JWT token. The token is signed but is not encrypted (so for instance it is decodeable by jwt.io webpage).

I have the dependency in requirements.txt: PyJWT[crypto]==2.0.1. Which supposed to install both PyJWT and cryptography library.

and I have the code like so

decoded_token = jwt.decode(token, "", algorithms=["RS256"])

(RS256 returned by jwt.io when trying to decode it). So far I left public key parameter empty.

which currently generates an error

Error: Could not deserialize key data. The data may be in an incorrect format
or it may be encrypted with an unsupported algorithm.

How can I fix the problem?

4

0 回答 0