ApiSkills

Authentication · 10 min

JWT: JSON Web Tokens

A signed, self-describing token. Learn its three parts and why each claim matters.

A JWT is three base64url parts joined by dots: header.payload.signature. The header names the algorithm; the payload holds claims (data); the signature proves the token was not tampered with.

# Issue HS256 + RS256 tokens for your app
curl -X POST https://api.ifsjaipur.cloud/playground/auth/jwt/issue -u "APP_ID:APP_SECRET"

# Verify a token (signature + exp + aud)
curl https://api.ifsjaipur.cloud/playground/auth/jwt -H "Authorization: Bearer <jwt>"

# Decode WITHOUT verifying — see the parts
curl -X POST https://api.ifsjaipur.cloud/playground/auth/jwt/decode -H "content-type: application/json" -d "{\"token\":\"<jwt>\"}"

Why the claims matter

ClaimMeaningWhy check it
ississuerConfirm who minted the token
subsubjectWho/what the token represents
audaudienceReject tokens not meant for your service
iatissued atKnow how old it is
expexpiryReject expired tokens — the single most important check
  • HS256 signs with a shared secret (both sides hold it).
  • RS256 signs with a private key; anyone can verify with the public key (fetch it at /playground/auth/jwt/public-key).

Tip · The /decode tool proves a crucial point: a JWT payload is just base64 — readable by anyone. Never trust its contents until you have verified the signature and exp.