IBM / python-sdk-core

The python-sdk-core repository contains core functionality required by Python code generated by the IBM OpenAPI SDK Generator.
Apache License 2.0
20 stars 27 forks source link

fix: use options dict for jwt.decode verify flag #89

Closed psschwei closed 3 years ago

psschwei commented 3 years ago

Closes #88

The verify parameter for the jwt.decode function has been deprecated as of PyJWT v2.0.0. It has been moved into an options dictionary with key verify_signature. This PR updates the code to use the new dict.

Note that when I cloned the repo there were several failing tests unrelated to this code change (the same tests failed both before and after the code change).

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

rmkeezer commented 3 years ago

Thanks for PR! In addition to the changes to the verify signature, it seems pyjwt needs the algorithms parameter to also be specified and a few other changes, I opened a PR here https://github.com/IBM/python-sdk-core/pull/92 including both changes. We have a new patch release that limits pyjwt to <2.x until these changes are good to go.

padamstx commented 3 years ago

@psschwei Thank you for submitting this PR, but we had a bit of a firedrill over the last couple of days in this area and the net result is that we've incorporated your change into a slightly larger PR (https://github.com/IBM/python-sdk-core/pull/92). I'll close this one out. Please let us know if you run into any other problems with the python core. Thanks!