direct-actions/JSON Web Token (JWT)

Encode/Decode/Sign/Verify JSON Web Tokens with options including masking, JSON object dump & more.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stalelast commit Nov 19, 2024
License
Apache 2.0

Pinned Snippet

workflow.ymlSHA-pinned
uses: direct-actions/jwt@78816fbc34fe31cf1445a1cdff4e39c2b9e79f57 # v1.1.1

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
algorithm(Encode) Signing algorithm for encoding a new JWT, only HS256 currently supported.HS256
debug(Decode/Encode) Enable debugging output.false
enable-display(Decode/Encode) Enable pretty colorized display of JWT decoded object.false
enable-fail-on-unverified(Decode) Fail if the JWT signing cannot be verified.true
enable-mask-jwt(Decode/Encode) Enable masking of entire JWT in Actions output.false
enable-mask-signature(Decode/Encode) Enable masking of JWT signature in Actions output.true
header(Encode) Header yq template for encoding a new JWT (JSON or YAML).alg: ${ALGORITHM} typ: JWT
jwt(Decode) JWT that will be decoded & verified.no
payload(Encode) Payload data structure for encoding a new JWT (JSON or YAML).no
secret(Decode/Encode) Secret used to sign or verify a signed JWT.your-256-bit-secret
namedescription
algorithmSigning algorithm.
headerDecoded header in JSON.
jwtEncoded & signed JWT.
payloadDecoded payload in JSON.
signatureDecoded signature in Base64 (not URL safe Base64).
verifiedBoolean-as-string ("true" / "false") indicating if the JWT is verified.