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

cmd: add handling of HS keys #163

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

greenpau
Copy link

@greenpau greenpau commented Feb 8, 2022

cmd: add handling of HS keys

Signed-off-by: Paul Greenberg [email protected]

Signed-off-by: Paul Greenberg <[email protected]>
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants