Sign inSign up

bimspot/jwt-generator

By bimspot

Updated almost 2 years ago

The script produces a signed JWT token with the provided payload and options.

Image
0

1.1K

bimspot/jwt-generator repository overview

JWT

The script produces a signed JWT token with the provided payload and options.

Inputs

Environment variables correspond to the parameters of the node library from Auth0.

  • PAYLOAD: could be an object literal, buffer or string representing valid JSON.
  • SECRET: is a string, buffer, or object containing either the secret for HMAC algorithms or the PEM encoded private key for RSA and ECDSA.
  • OPTIONS: JWT token options as per the node library.

Outputs

The signed JWT is logged to the console and can be collected as a result of the workflow step

Test locally

docker build -t jwt .
docker run \
    --env PAYLOAD='{"data":{"userId":"user1"}}' \
    --env SECRET='super-secret-passphrase' \
    --env OPTIONS='{"expiresIn":"2h","issuer":"argo-workflows"}' \
    jwt

Tag summary

Content type

Image

Digest

Size

69.9 MB

Last updated

over 4 years ago

docker pull bimspot/jwt-generator