https://github.com/felixvo/homebrew-jwtcli
Decode, verify and generate JWT in terminal
https://github.com/felixvo/homebrew-jwtcli
cli jwt jwt-cli jwt-token
Last synced: 5 months ago
JSON representation
Decode, verify and generate JWT in terminal
- Host: GitHub
- URL: https://github.com/felixvo/homebrew-jwtcli
- Owner: felixvo
- Created: 2019-04-27T06:51:57.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-04-19T11:42:43.000Z (about 6 years ago)
- Last Synced: 2023-03-05T19:34:20.459Z (about 3 years ago)
- Topics: cli, jwt, jwt-cli, jwt-token
- Language: Go
- Size: 7.94 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JWT CLI

Decode/Verify and generate JWT from your terminal
## Installation
```bash
brew tap felixvo/jwtcli
brew install jwtcli
```
## Usage
### Decode
If you just want to check payload.
```bash
jwtcli your-token
```
Or with `secret`
``` bash
jwtcli --secret your-secret token
```
Ex:
```bash
jwtcli -s your-256-bit-secret your-token
HEADER
alg: HS256
typ: JWT
PAYLOAD
{
"iat": 1516239022,
"name": "John Doe",
"sub": "1234567890"
}
INFO
iat: 1516239022 formated:2018-01-18 08:30:22
SIG
SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
```
### Encode
```bash
jwtcli --secret you-secret sign --payload '{"user_id":6,"exp":1587971056}'
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODc5NzEwNTYsImlhdCI6MTU2NzY4MjM0MywidXNlcl9pZCI6Nn0.LtMr-_nZQCukKi6y4XTGGHdmzo8rDW20BnAdDyfLxTc
```