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

Add unit test cases to parse JWT tokens signed with ECDSA keys #106

Merged
merged 1 commit into from
Sep 24, 2021

Conversation

sebastien-rosset
Copy link
Contributor

@sebastien-rosset sebastien-rosset commented Sep 18, 2021

In parse_test.go:

  1. add test case where the JWT token is signed with a ECDSA private key and "EC256" is in the list of accepted algorithms.
  2. add test case where the JWT token is signed with a ECDSA private key but "EC256" is NOT in the list of accepted algorithms.
  3. Add validation for Token.Valid and Token.Signature in the unit tests.

Copy link
Member

@lggomez lggomez left a comment

Choose a reason for hiding this comment

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

LGTM, nice to have in the test coverage

Copy link
Collaborator

@oxisto oxisto left a comment

Choose a reason for hiding this comment

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

LGTM

@oxisto oxisto merged commit fd8cd69 into golang-jwt:main Sep 24, 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.

3 participants