jwtier
v1.0.3
Published
A CLI tool to generate JWTs on the fly
Downloads
4
Readme
JWTier
A simple Node.js CLI tool to generate JWTs using HS256 algorithm.
Installation
In order to use this CLI tool you can install it globally:
## with npm
npm install -g jwtier
## pnpm
pnpm add -g jwtier
## or yarn
yarn global add jwtier
or use it with npx:
npx jwtier
Usage
Call jwtier
from the command line and you will be prompted to enter the following information:
| Field | Description | Example |
| ------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------- |
| secret | The secret from which the JWT will be generated. If you don't have one JWTier will generate one for you. | mysecret
|
| issuer | Defines the iss
JWT payload. | my-company
|
| audience | Defines the aud
JWT payload | my-app
|
| subject | Defines the sub
JWT payload | auth
|
| expiration | Defines the exp
JWT payload. It can be a Unix Timestamp or a string which will be resolved as a time span | 1h
, 2.5 weeks
, 1717623978
|
| extra payload | Defines the extra payload to be added to the JWT. It must be a valid JSON string. | {"foo": "bar"}
|
After this JWTier will display the JWT and the secret on your command line and copy it to your clipboard; you can test it with the JWT Debugger from jwt.io!