Traceback (most recent call last):
File "<REDACTED>/example.py", line 12, in <module>
print(jwt.decode(jwt.encode({"some": "data here"}, pem, algorithm="RS512"), pem, algorithms="RS512"))
File "<REDACTED>/code/pyjwt/jwt/api_jwt.py", line 207, in decode
decoded = self.decode_complete(
File "<REDACTED>/code/pyjwt/jwt/api_jwt.py", line 148, in decode_complete
decoded = api_jws.decode_complete(
File "<REDACTED>/code/pyjwt/jwt/api_jws.py", line 206, in decode_complete
self._verify_signature(signing_input, header, signature, key, algorithms)
File "<REDACTED>/code/pyjwt/jwt/api_jws.py", line 306, in _verify_signature
if not alg_obj.verify(signing_input, key, signature):
File "<REDACTED>/code/pyjwt/jwt/algorithms.py", line 420, in verify
key.verify(sig, msg, padding.PKCS1v15(), self.hash_alg())
AttributeError: '_RSAPrivateKey' object has no attribute 'verify'
Decoding JWTs using the RS512 algorithm (and presumably all RSA algorithms), fails upon trying to call
verify
on a_RSAPrivateKey
instance.Expected Result
Actual Result
Reproduction Steps
System Information
This command is only available on PyJWT v1.6.3 and greater. Otherwise, please provide some basic information about your system.