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

PyJWT.decode: move verify param into options #271

Merged
merged 1 commit into from
Jun 21, 2017

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Jun 12, 2017

Followup to #270:

It seems that "verify" is only deprecated with PyJWS.decode, which
makes sense, since you would have to override a lot of options to skip
the verification in PyJWT._validate_claims.

This makes PyJWT.decode use the verify_signature option when calling
PyJWT.decode, and therefore also allows to use stacklevel=2 there
then for the DeprecationWarning.

@coveralls
Copy link

coveralls commented Jun 12, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling 947c8c1 on blueyed:PyJWT.decode-fix-deprecation into 639fa01 on jpadilla:master.

@blueyed
Copy link
Contributor Author

blueyed commented Jun 12, 2017

Please let me know if I understood it correctly now, and if the fixup is better than the original in your opinion.
I'll squash it then.

@coveralls
Copy link

coveralls commented Jun 12, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling 91d06b4 on blueyed:PyJWT.decode-fix-deprecation into 639fa01 on jpadilla:master.

@jpadilla
Copy link
Owner

jpadilla commented Jun 21, 2017

@blueyed looks good to me 👍 thanks!

Followup to jpadilla#270:

It seems that "verify" is only deprecated with `PyJWS.decode`, which
makes sense, since you would have to override a lot of options to skip
the verification in `PyJWT._validate_claims`.

This makes `PyJWT.decode` use the `verify_signature` option when calling
`PyJWT.decode`, and therefore also allows to use `stacklevel=2` there
then for the DeprecationWarning.
@blueyed blueyed force-pushed the PyJWT.decode-fix-deprecation branch from 91d06b4 to f61d37f Compare June 21, 2017 19:48
@blueyed
Copy link
Contributor Author

blueyed commented Jun 21, 2017

@jpadilla
Thanks for the review, squashed.

@coveralls
Copy link

coveralls commented Jun 21, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling f61d37f on blueyed:PyJWT.decode-fix-deprecation into 639fa01 on jpadilla:master.

@jpadilla jpadilla merged commit e4c67b1 into jpadilla:master Jun 21, 2017
@blueyed blueyed deleted the PyJWT.decode-fix-deprecation branch June 21, 2017 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants