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

Fix jwt -show #406

Merged
merged 2 commits into from
Sep 6, 2024
Merged

Fix jwt -show #406

merged 2 commits into from
Sep 6, 2024

Conversation

AlexanderYastrebov
Copy link
Contributor

Some time ago (was lazy to dig history) jwt.Parse was changed to require non-nil keyFunc.

This broke jwt -show command that prints header and claims and does not validate the token:

$ echo $TOKEN | jwt -show -
Error: malformed token: token is unverifiable: no keyfunc was provided

This change fixes jwt -show.

Some time ago (was lazy to dig history) jwt.Parse was changed to require
non-nil keyFunc.

This broke `jwt -show` command that prints header and claims and
does not validate the token:
```
$ echo $TOKEN | jwt -show -
Error: malformed token: token is unverifiable: no keyfunc was provided
```

This change fixes `jwt -show`.
@oxisto
Copy link
Collaborator

oxisto commented Aug 29, 2024

Sounds reasonably to me. Can we somehow add a little more documentation to the to itself that the token is only displayed but not verified?

@AlexanderYastrebov
Copy link
Contributor Author

I've updated usage texts.

@mfridman mfridman merged commit 0123f1a into golang-jwt:main Sep 6, 2024
8 checks passed
@AlexanderYastrebov AlexanderYastrebov deleted the fix-jwt-show branch September 6, 2024 09:15
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