https://github.com/openware/barong-jwt
Tool to generate JWT
https://github.com/openware/barong-jwt
crypto cryptocurrency-exchange-software go golang jwt
Last synced: 11 months ago
JSON representation
Tool to generate JWT
- Host: GitHub
- URL: https://github.com/openware/barong-jwt
- Owner: openware
- License: apache-2.0
- Created: 2020-09-24T20:20:16.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-11T10:18:14.000Z (over 4 years ago)
- Last Synced: 2025-04-05T22:07:03.697Z (11 months ago)
- Topics: crypto, cryptocurrency-exchange-software, go, golang, jwt
- Language: Go
- Homepage: https://www.openware.com
- Size: 16.6 KB
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Barong JWT
Tool to forge barong JWT to be used in any service intended to run in the Barong ecosystem.
It is very useful in developement mode to develop and test a microservice without the need of deploying any dependency of the stack.
## Parameters
| Param | Default | Description |
|-------|-----------------|-------------|
| uid | U487205863 | UID |
| email | admin@barong.io | Email |
| role | admin | Role |
| level | 3 | Level |
`JWT_PRIVATE_KEY_PATH` is used to specify JWT private key path, otherwise `config/rsa-key` would be created and used.
## Example of API call to barong
```bash
# Create the secret key file if it doesn't exist
barong-jwt
# Configure barong to use a specific secret file
export JWT_PRIVATE_KEY_PATH=config/rsa-key
# Run barong server
rails s
```
From another terminal tab:
```
JWT=$(barong-jwt --uid IDBD12DEB15B)
curl -H "Authorization: Bearer ${JWT}" localhost:3000/api/v2/resource/users/me
```
## License
Barong JWT is released under the terms of the [Apache License 2.0](LICENSE.md).
It's used in openware [cryptocurrency exchange software](https://www.openware.com) stack, and more!