-
-
Notifications
You must be signed in to change notification settings - Fork 545
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
Replace jose with pyjwt #819
Replace jose with pyjwt #819
Conversation
Thank you @nijel, my fault to forgot testing locally against EOL python versions (I am too much addicted to remove EOL interpreters from my device). |
for more information, see https://pre-commit.ci
c7d920b
to
a4f7d73
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #819 +/- ##
==========================================
- Coverage 77.80% 77.77% -0.04%
==========================================
Files 330 330
Lines 10097 10119 +22
Branches 681 685 +4
==========================================
+ Hits 7856 7870 +14
- Misses 2087 2093 +6
- Partials 154 156 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Merged, thanks for your contribution! |
Proposed changes
Replace
python-jose
withpyjwt
(see #503).Types of changes
Please check the type of change your PR introduces:
Checklist
Put an
x
in the boxes that apply. You can also fill these out after creatingthe PR. If you're unsure about any of them, don't hesitate to ask. We're here to
help! This is simply a reminder of what we are going to look for before merging
your code.
Other information
As discussed in #503 some changes was done to perform the migration:
calc_at_hash
static method toOpenIdConnectAuth
since PyJWT does not support validating claims which are not part of JWT RFCs (see Add support for the OIDC at_hash claim jpadilla/pyjwt#296)"at_hash"
claim inOpenIdConnectTestMixin.prepare_access_token_body
(see above)"aud"
claim inAuth0OAuth2Test.access_token_body
because PyJWT behaves different from jose: it does not allow this claim to not be present if is should be validatedAuth0OAuth2
the logic which tries every found key since PyJWT does not implement it while jose does.2.7.0
which is the minimum version which provides the full API to handle OIDC