Skip to content

Conversation

greenpau
Copy link

@greenpau greenpau commented Feb 8, 2022

cmd: add handling of HS keys

Signed-off-by: Paul Greenberg greenpau@outlook.com

Signed-off-by: Paul Greenberg <greenpau@outlook.com>
@AlexanderYastrebov
Copy link
Contributor

IMO HS already works as expected:

echo '{"foo":"bar"}' | jwt -alg HS512 -key <(echo -n foobar) -sign - | jwt -verify - -key <(echo -n foobar)

The only thing this change adds is splitting the key on the first whitespace for no reason. If one would like to have the key without whitespace or a newline at the end they should just create it:

echo -n foobarbaz > ~/experimental/jwt/token.key
@greenpau
Copy link
Author

IMO HS already works as expected:

@AlexanderYastrebov , it very well may be 😄 But, in imho, <(echo -n foobar) is not a super user-friendly way to pass keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants