Skip to content

Commit

Permalink
Fixes jwt command to support EdDSA algorithm (golang-jwt#118)
Browse files Browse the repository at this point in the history
Fixes
```
$ echo '{"foo":"bar"}' | jwt -key test/ed25519-private.pem -alg EdDSA -sign -
Error: error signing token: key is of invalid type
```

Signed-off-by: Alexander Yastrebov <yastrebov.alex@gmail.com>
  • Loading branch information
AlexanderYastrebov authored and oxisto committed Feb 21, 2023
1 parent 06bad75 commit ea53832
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/jwt/main.go
Expand Up @@ -293,7 +293,7 @@ func isRs() bool {
}

func isEd() bool {
return strings.HasPrefix(strings.ToUpper(*flagAlg), "Ed")
return *flagAlg == "EdDSA"
}

type ArgList map[string]string
Expand Down

0 comments on commit ea53832

Please sign in to comment.