orrc / jwt-generator-docker

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

Home Page:https://hub.docker.com/r/orrc/jwt-generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

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

https://hub.docker.com/r/orrc/jwt-generator

License:The Unlicense


Languages

Language:Shell 92.1%Language:Dockerfile 7.9%