An API that checks the signature and then believes every claim has handed its access decisions to whoever minted the token.
The trending question JWT Says 'Admin'. Should Your API Believe It? sits on dev.to's trending page on November 25, 2026. The durable answer: a signature is a statement about origin and integrity, and a trust boundary is where verification ends and judgment begins.
The three parts of a JWT
A JWT is three base64url-encoded parts joined by dots: a header, a payload, and a signature. The header names the algorithm, the payload carries claims such as issuer, subject, audience, and expiry, and the signature covers the first two parts exactly as transmitted.
The signature is computed with a key only the issuer holds, using either a shared secret with HMAC or a private key with a digital signature scheme. Change one character of the payload and verification fails, which is what makes the token tamper-evident. The introductory material at jwt.io walks the decoded pieces nicely.
What the signature actually proves
The proof covers origin and integrity: the token came from whoever holds the key, and its bytes survived unchanged. Everything beyond that is a claim the API must evaluate on its own terms, because issuers make mistakes, roles go stale, and tokens reach audiences their issuer never considered.
One classic bug class shows how sharp the boundary is. Early JWT libraries trusted the algorithm named inside the token header, so a token carrying an unexpected algorithm value could push a verifier into checking bytes under the wrong scheme. The defensive fix is to pin the algorithm on the server and treat the header as plain data.
| Check | What it answers | Failure mode if skipped |
|---|---|---|
| Signature | Did my key holder issue this? | Tokens pass without a real issuer. |
| Algorithm pinning | Was the expected scheme used? | Verification steered by the header. |
| Issuer and audience | Was it minted for this system? | Tokens reused across services. |
| Expiry | Is it still current? | Stale permissions linger. |
Drop in your PDF - it doesn't leave your device.
Every miss becomes a red node on your map.
Free plan: 21 nodes, no card, no countdown.
Designing the trust boundary
Verification runs server-side on every request, in one place, before any handler reads a claim. Short expiries cap the damage of a leaked token, separate keys per purpose stop one key from doing double duty, and revocation handles the roles that change mid-life.
The mental model is a border checkpoint: the signature gets you to the counter, and the claim checks decide entry. APIs that skip the second half answer the title's question the wrong way, and the fix is a checklist that runs in code, every time.
Key takeaways
- A JWT signature proves key possession and byte integrity, and every claim needs its own validation on arrival.
- Pin the algorithm server-side and treat the token header as data, which closes the historical algorithm-confusion bug class.
- Validate issuer, audience, and expiry on every request before any handler acts on a claim.
- Short lifetimes, per-purpose keys, and one shared verification path keep the boundary easy to audit.
Quick answers
What does a JWT signature prove?
That the token was produced by whoever holds the signing key and arrived unmodified. The truth of the claims inside is a separate question.
What is an algorithm confusion bug?
A verifier that lets the token's header pick the algorithm can be steered into checking the signature under an unintended scheme. Servers pin the expected algorithm to prevent it.
Which claims should an API validate?
Issuer, audience, and expiry at minimum, plus any claim your authorization depends on. Each check answers one specific question about the token.
How long should access tokens live?
As short as the workflow tolerates. Short expiries bound the risk of a leaked or over-broad token, and refresh flows handle renewal.
One thing to do tonight
Open one API you maintain tonight and write down every check that runs before a handler sees a request: signature, algorithm, issuer, audience, expiry. Any missing line is small to add and big in effect, and pasting the middleware into Brain makes a five-question quiz that keeps the checklist sharp.