Skip to content

A simple command-line utility to encode JSON Web Tokens (JWT).

License

Notifications You must be signed in to change notification settings

orrc/jwt-generator-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jwt-generator

A simple command-line utility to encode JSON Web Tokens (JWT).

Usage

The Docker container takes two parameters:

  • the secret used for signing the token
  • the JSON payload

The JSON payload can be provided as an argument:

docker run --rm orrc/jwt-generator my-shared-secret '{"foo": "bar", "num": 1234}'

Or it can be piped in:

echo '{"foo": "bar", "num": 1234}' | docker run --rm -i orrc/jwt-generator my-shared-secret

The JWT is printed to stdout, followed by a newline.

Credits

This is just a convenient wrapper around a handy Bash script created by @williamhaley, including some shell magic by Filipe Fortes.

Releases

No releases published

Packages

No packages published