Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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
jonahbron wants to merge 2 commits into micropython:master
base: master
Choose a base branch
Loading
from jonahbron:jwt-es256

Conversation

@jonahbron
Copy link

@jonahbron jonahbron commented Mar 18, 2024

Add optional support for ES256 JWT signing/verifying to PyJWT using @dmazzella's cryptography port.

Test output:

Testing HS256
 Encode/decode test: OK
 Invalid signature test: OK
 Expired token test: OK
Testing ES256
 Encode/decode ES256 test: OK
 Invalid signature test: OK

AuroraTea reacted with thumbs up emoji
Add optional support for ES256 JWT signing/verifying to PyJWT using
@dmazzella's cryptography port.
Signed-off-by: Jonah Bron <hi@jonah.id>
Copy link
Member

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_der and _sig_der_to_jws at 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 cryptography installed.
  • 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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /