Update cheatsheets

This commit is contained in:
ivuorinen
2024-02-21 11:19:49 +00:00
parent 4e88a1b42f
commit 3d653cc7e6
4803 changed files with 127002 additions and 0 deletions

26
jwt Normal file
View File

@@ -0,0 +1,26 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# jwt
> 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}}`