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 for EdDSA (or don't validate the algorithm) #177

Closed
MichaelBoselowitz opened this issue Mar 14, 2022 · 0 comments · Fixed by #238
Closed

Support for EdDSA (or don't validate the algorithm) #177

MichaelBoselowitz opened this issue Mar 14, 2022 · 0 comments · Fixed by #238

Comments

@MichaelBoselowitz
Copy link

MichaelBoselowitz commented Mar 14, 2022

Summary

EdDSA is currently not a supported algorithm, it would be great if it could be, however I know that the algorithm support comes from a dependency. Since that is mostly outside the purview of this library, I will also propose a feature request to add a flag to ignore the algorithm (--ignore-alg or similar). My main use case is to just decode the JWT's payload—which of course doesn't require validation of the algorithm or the headers at all. It would certainly be nice to have, but I'm wondering if it makes sense to block the ability to decode the payload.

Steps to reproduce

jwt decode "jwt.encoded.with.EdDSA" outputs the following:

The JWT provided is invalid because Error(Json(Error("unknown variant `EdDSA`, expected one of `HS256`, `HS384`, `HS512`, `ES256`, `ES384`, `RS256`, `RS384`, `RS512`, `PS256`, `PS384`, `PS512`", line: 1, column: 26)))

Expected behavior

The decoded JWT perhaps with a warning instead that the algorithm was not supported OR the ability to add a flag, e.g. jwt decode --ignore-alg "jwt.encoded.with.EdDSA", to decode and validate the payload.

@MichaelBoselowitz MichaelBoselowitz changed the title Support for EdDSA (or don't validated the algorithm) Support for EdDSA (or don't validate the algorithm) Mar 14, 2022
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 a pull request may close this issue.

1 participant