Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The specified alg value is not allowed RS256 #236

Closed
karloscodes opened this issue Feb 12, 2017 · 2 comments
Closed

The specified alg value is not allowed RS256 #236

karloscodes opened this issue Feb 12, 2017 · 2 comments
Labels

Comments

@karloscodes
Copy link

karloscodes commented Feb 12, 2017

Hi there In getting 'The specified alg value is not allowed' when trying to decrypt an auth0 token.
Here are the details:

decoded = jwt.decode(token, public_key,  algorithms=['RS256'])

Installed packages

PyJWT==1.4.2
cryptography==1.7.2
pycrypto==2.6.1
ecdsa==0.13

Python 2.7.12

Can you please tell what am I doing wrong?

@mikenholt
Copy link

It doesn't like the list type, so it should read algorithm='RS256'

@mark-adams
Copy link
Contributor

@mikenholt No, that is incorrect. algorithms expects a list of algorithms when decoding.

@ccverak This really only happens for one reason: The JWT token does not have it's alg header set to "RS256" which probably means it was encoded using the wrong algorithm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants