Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mehditeymorian/jwt
JWT CLI Decoder & Encoder
https://github.com/mehditeymorian/jwt
cli cli-app cryptography go jwt jwt-cli jwt-token
Last synced: about 1 month ago
JSON representation
JWT CLI Decoder & Encoder
- Host: GitHub
- URL: https://github.com/mehditeymorian/jwt
- Owner: mehditeymorian
- License: apache-2.0
- Created: 2022-07-30T05:45:32.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-09-11T18:36:10.000Z (over 1 year ago)
- Last Synced: 2024-06-20T17:29:52.698Z (6 months ago)
- Topics: cli, cli-app, cryptography, go, jwt, jwt-cli, jwt-token
- Language: Go
- Homepage:
- Size: 231 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
JWT CLIEncode & Decode JWT Tokens
# Installation
```bash
go install github.com/mehditeymorian/jwt/v2@latest
```Commands are as below:
- **config**: view, edit, and set config
- **encode**: create standard JWT token
- **decode**: decode a JWT token
- **gen**: generate different keys such as rsa, hmac, ecdsa
-
```bash
# run the following command to see the full details.
jwt help
```# Configuration
The `JWT` use corresponding set of keys when you use different commands. For example, it will use rsa keys if you use command `jwt gen rsa`.
```yaml
interactive: true
rsa:
public_key: |-
key
private_key: |-
key
hmac:
key: key
base64_encoded: false
ecdsa:
public_key: |-
key
private_key: |-
key
```> Note: if `interactive` config set to true, the command parameters will be taken from user interactively instead of reading them from command options.
> use `-c` option to pass config file address.
## Set Config
The order of reading config is as follows if config is not specified as option:
1. `.jwt.(yaml|yml)` file in the path where the `JWT` is running.
2. `/etc/jwt/.jwt.(yaml|yml)` file as default configuration. if config file is not present, one will be created.# Contribution
Any contribution in any form is welcomed. Open an issue to discuss it.# Contact
- [Email](mailto:[email protected])# License
Unless otherwise noted, the JWT source files are distributed under the Apache Version 2.0 license found in the LICENSE file.