JWT Functions

Create, decode, and verify JSON Web Tokens.

Decode

Decode a JWT without verifying the signature. Useful for reading token claims.

InputOutput
tokenheader (json), payload (json)

Sign

Create and sign a new JWT.

InputTypeDescription
keystringSigning key (secret or private key)
audiencestringToken audience (aud claim)
issuerstringToken issuer (iss claim)
expiresInnumberSeconds until expiration
jwtidstringUnique token ID (jti claim)
noTimestampbooleanSkip iat claim
headerjsonCustom header fields
notBeforenumberSeconds before token is valid
subjectstringToken subject (sub claim)
algorithmenumHS256, HS384, HS512, RS256, RS384, RS512, ES256, ES384, ES512

Output: token (string)

Verify

Verify a JWT signature and decode its contents.

InputTypeDescription
tokenstringThe JWT to verify
keystringPublic key or shared secret (leave empty for auto-JWKS)
algorithmenumExpected algorithm (auto-detected from token if empty)
audiencestringExpected audience
issuerstringExpected issuer
ignoreExpirationbooleanSkip expiration check
subjectstringExpected subject

Outputs: header (json), payload (json), valid (boolean)

Example: OAuth Token Flow

OAuth Token Flow

Get token from Auth0, extract and verify JWT

API Connector

Post

URL
https://auth0.com/oauth/token
Body
{"grant_type":"client_credentials"}
Body

Object

Get

object
Body
path
access_token
output

JWT

Verify

token
output
payload
valid

Auto-JWKS

If key is empty, Fainflow automatically fetches the public key from the token issuer's /.well-known/jwks.json endpoint. This works out of the box with Auth0, Okta, and other OIDC providers.

Supported algorithms: HS256/384/512 (HMAC), RS256/384/512 (RSA), ES256/384/512 (ECDSA).