Skip to content
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

Allow to verify with private key on ECAlgorithm, as well as on Ed25519Algorithm. #645

Merged
merged 3 commits into from
Apr 16, 2021

Conversation

dajiaji
Copy link
Contributor

@dajiaji dajiaji commented Apr 9, 2021

At the current implementation of Ed25519Algorithm, verify() can accept a private key as a verification key (See https://github.com/jpadilla/pyjwt/blob/master/jwt/algorithms.py#L583-L584). However, ECAlgorithm's verify() cannot.

I think the both of two should work in the same way. There are two options:

  1. Remove private key support from Ed25519Algorithm's verify().
  2. Add private key support to ECAlgorithm's verify().

Considering backward-compat, I selected 2.

Copy link
Owner

@jpadilla jpadilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@jpadilla jpadilla merged commit fb86f9d into jpadilla:master Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants