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

Support verification in the CLI #131

Open
driverpt opened this issue Jun 29, 2021 · 1 comment
Open

Support verification in the CLI #131

driverpt opened this issue Jun 29, 2021 · 1 comment

Comments

@driverpt
Copy link

e.g.:

jwt verify <jwt-as-string> <secret>
@codedust
Copy link
Contributor

This is already possible using the -S parameter:

jwt decode --alg 'HS256' -S <secret> <jwt-as-string>

e.g.

JWT=`jwt encode '{"field":"value"}' --secret 1234567890 --alg 'HS256' --exp '+1 year'`
jwt decode --alg 'HS256' -S 1234567890 $JWT

However, this is not obvious, i.e. no warning is shown if the signature is not checked. Pull request #133 improves error messages for signature validation.

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

No branches or pull requests

2 participants