JWT lint: alg none, crit, key-URL headers, expiry, audience (decode only)

$0.005 USDC per call · Developer and security · POST /api/v1/jwt-lint · Id jwt-lint

Decodes a compact JWT (never verifies the signature) and checks it against RFC 7519 and RFC 8725 for an agent about to trust or forward it: alg none or missing, crit and key-supplying headers (jku, x5u, jwk), kid injection shape, duplicate claims, and exp, nbf, iat against a caller-supplied time, plus optional expected algorithms, issuer and audience. Without asOf the time claims are not judged and the status is unknown, never pass. A pass means no lint rule fired; it does not mean the token is authentic, and encrypted JWE tokens are unsupported.

What you get

Catches the classic alg-none, key-injection and never-expiring token mistakes before the token is relied on.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/jwt-lint. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.

curl -i -X POST https://agents.writerslogic.com/api/v1/jwt-lint \
  -H 'content-type: application/json' \
  -d '{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1MSIsImV4cCI6MTgwMDAwMDAwMH0.c2ln","asOf":1700000000,"expectedAlgs":["HS256"]}'

Input

FieldTypeRequiredDescription
tokenstring; length 0..8192yesCompact JWS: header.payload.signature.
asOfinteger; 0..100000000000noReference instant, epoch seconds. Required to judge exp/nbf/iat.
leewaySecondsinteger; 0..3600noClock-skew allowance, default 0.
expectedAlgsarray<string; length 0..20>; max 10 itemsnoAllow-list of algorithms; any other alg fails.
expectedIssuerstring; length 0..500no
expectedAudiencestring; length 0..500no
requireExpbooleannoDefault true: a token without exp fails.

Example request body

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1MSIsImV4cCI6MTgwMDAwMDAwMH0.c2ln",
  "asOf": 1700000000,
  "expectedAlgs": [
    "HS256"
  ]
}

Result

The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.

FieldTypeRequiredDescription
statusstring; one of "pass", "fail", "unknown", "unsupported"nopass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass.
algstringno
timeCheckedbooleanno
headeranynoDecoded JOSE header object.
payloadanynoDecoded claims set.
witnessesarray<object>no
versionsobjectnoEvery semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
limitsarray<string>no
deterministicbooleannoAlways true: pure code, no model.

Pay and connect

Available through: x402 (USDC on Base), MCP. MCP clients reach it through the code-preflight-kit package.

Machine-readable