-
-
Notifications
You must be signed in to change notification settings - Fork 450
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
✨ Added support for py webauthn 2.0+ #702
Conversation
I will investigate the issues on Python < 3.11! |
f5d2f84
to
710a511
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #702 +/- ##
==========================================
- Coverage 97.83% 97.83% -0.01%
==========================================
Files 78 78
Lines 3379 3378 -1
Branches 376 376
==========================================
- Hits 3306 3305 -1
Misses 42 42
Partials 31 31 ☔ View full report in Codecov by Sentry. |
710a511
to
cb3acfd
Compare
@claudep seems to be a pretty straight-forward upgrade I CTRL + F the docs to see if there was anything to update, but I couldn't find anything. A mention in the changelog is probably sufficient? Let me know if you prefer to keep the invidivual commits or would rather see them squashed, and if #700 lands first, I can obviously rebase. |
May I ask you to approve my recent PRs, then you can rebase yours on top? |
Of course, I was already taking a look out of interest :) |
WebAuthn 2.0 refactored pydantic usage out of the codebase. For simplicity's sake, the minimum version is now set to 2.0 so that no compat layer is required. It appears that wat used to be Pydantic validation errors are now raised as InvalidJSONStructure exceptions, the form validation code is updated to reflect that.
This has changed in webauthn 2.0+ compared to 1.x
cb3acfd
to
8fc2055
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Description
Closes #701
WebAuthn 2.0 refactored pydantic usage out of the codebase.
Tests were passing locally with both 1.x and 2.y, but for simplicity's sake, the minimum version is now set to 2.0 so that no compat layer is required.
There doesn't seem to have been a real reason to catch pydantic validation errors - nothing was documented in 96bbd1a and the model does not appear to perform additional validations (see
https://github.com/duo-labs/py_webauthn/blob/v1.11.1/webauthn/authentication/verify_authentication_response.py ), but possibly the base model did. Either way, it was not a tested execution branch.
Motivation and Context
Drops dependency on Pydantic which may cause version conflicts with other tools.
How Has This Been Tested?
tox -e py311-dj42-webauthn
and having the Github CI pipeline. There shouldn't be any functional changes.Screenshots (if appropriate):
n/a
Types of changes
Checklist:
n/a
I have added tests to cover my changes.