REST API Tokens
Cheat sheet · https://pcornel.dk/topic.php?topic=1550
Answer
Tokens are API credentials whose permissions, audience, lifetime, rotation and revocation must follow the target API contract.
Remember
A syntactically valid token or one successful request does not prove correct scope, audience or revocation enforcement.
First checks
Decode the token — a JWT is three Base64 parts — and read exp, aud, iss and the scope. Call the API with an expired token → 401. Check where tokens are stored and that they are never written to logs.
Verify in this order
client authenticates to the token endpoint → short-lived access token issued (scope, audience, expiry) → sent as Bearer on each request → server validates signature, expiry and audience → expired: 401, obtain a new one → revoke on compromise
Where it usually breaks
physical/link dependency → local object state → peer/control state → policy → forwarding/adjacency → end-to-end result
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=1550