mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-06-07 21:26:01 +02:00
jwt: add page (#3350)
This commit is contained in:
parent
5ad73d10f3
commit
83aef83efa
1 changed files with 21 additions and 0 deletions
21
pages/common/jwt.md
Normal file
21
pages/common/jwt.md
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# jwt
|
||||||
|
|
||||||
|
> A command line tool to work with JSON Web Tokens (JWTs).
|
||||||
|
> Encryption algorithms available are HS256,HS384, HS512, RS256, RS384, RS512, ES256, ES384.
|
||||||
|
> For 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`
|
Loading…
Add table
Reference in a new issue