-
Couldn't load subscription status.
- Fork 1.1k
pyjwt: ES256 algorithm support for PyJWT. #826
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
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@jonahbron
jonahbron
force-pushed
the
jwt-es256
branch
2 times, most recently
from
March 18, 2024 08:19
88ee2b2 to
73af895
Compare
Add optional support for ES256 JWT signing/verifying to PyJWT using @dmazzella's cryptography port. Signed-off-by: Jonah Bron <hi@jonah.id>
Signed-off-by: Jonah Bron <hi@jonah.id>
@jonahbron
jonahbron
force-pushed
the
jwt-es256
branch
from
April 13, 2024 07:35
73af895 to
4e43bc0
Compare
Thanks for the contribution!
This isn't a full review, but some initial questions/feedback:
- Is this ES256 support compatible with the CPython PyJWT library?
- MicroPython tries to be minimal where possible, so I suggest inlining
_sig_jws_to_derand_sig_der_to_jwsat their place of use (they are only used once). That will save a bit of code size. - Also maybe the error message about required dependencies can be a little shorter/terser, to save size.
- Can you please put the new test into a separate test for ES256, so that the tests can be run independently, and the original one still pass without
cryptographyinstalled. - Would be great to also add the tests to CI, see
tools/ci.sh.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add optional support for ES256 JWT signing/verifying to PyJWT using @dmazzella's cryptography port.
Test output: