Open mterron opened 5 years ago
@mterron When you call validate you need to pass in the algorithm and secret.
jwt validate $TOKEN -a RS512 -s @/path/to/public/key
I do see what you are referring to. It works as designed (-a and -s are required), but the design is bad. I'll open an issue to only validate the structure when no algorithm or secret is passed in.
Maybe the error message should be something like "Missing mandatory options -a and -s" or something along those lines. The error message is really confusing as the algorithm used is one of the ones that jwt says it should be used. Thanks!
jwt fails to validate a token;