tldr/pages/common/jwt.md

22 lines
540 B
Markdown
Raw Normal View History

2019-10-09 16:59:16 +01:00
# jwt
> A command line tool to work with JSON Web Tokens (JWTs).
> Encryption algorithms available are HS256,HS384, HS512, RS256, RS384, RS512, ES256, ES384.
2021-01-07 18:06:43 +00:00
> More information: <https://github.com/mike-engel/jwt-cli>.
2019-10-09 16:59:16 +01:00
- Decode a JWT:
`jwt decode {{jwt_string}}`
- Decode a JWT as a JSON string:
`jwt decode -j {{jwt_string}}`
- Encode a JSON string to a JWT:
`jwt encode --alg {{HS256}} --secret {{1234567890}} '{{json_string}}'`
- Encode key pair payload to JWT:
`jwt encode --alg {{HS256}} --secret {{1234567890}} -P key=value`