tldr/pages/common/jwt.md
bl-ue 8ebd171d6f
*: fix typos reported by Hunspell (#5848)
Co-authored-by: marchersimon <50295997+marchersimon@users.noreply.github.com>
Co-authored-by: Seth Falco <seth@falco.fun>
Co-authored-by: Patrice Denis <patricedenis@users.noreply.github.com>
2021-05-20 16:13:41 -04:00

541 B

jwt

A command-line tool to work with JSON Web Tokens (JWTs). Encryption algorithms available are HS256, HS384, HS512, RS256, RS384, RS512, ES256, ES384. More information: https://github.com/mike-engel/jwt-cli.

  • 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