← Lessons/Anatomy of a JWT
← Anatomy of a JWT

Read the registered claims

Learn

The claims

RFC 7519 defines registered claims: short names with agreed meanings.

ClaimMeaningWho checks it
ississuer: who minted the tokenAPI: "do I trust this issuer?"
subsubject: who the token is aboutAPI: identifies the caller
audaudience: who the token is forAPI: "is this token meant for me?"
expexpiry timeAPI: reject after this moment
nbfnot beforeAPI: reject before this moment
iatissued atauditing, max-age policies
jtiunique token IDrevocation lists, replay detection

Anything else, like name, role or scope here, is a private claim that your system defines. Times are NumericDate: whole seconds since 1970-01-01 UTC. jq's todate filter or date -u -d @<seconds> makes them readable.

Notice "name": "Chloé Park". Payloads are UTF-8 JSON, and it's the é (bytes C3 A9) that produced the _ in the encoded payload.

Use jq -r on $payload to print the issuer (iss) and audience (aud), then print when the token was issued (iat) and when it expires (exp) as human-readable UTC dates.

$ bash solution.sh
Loading...

Output

Run your solution to see its output here.