# Tokens, JWT and OAuth Flows

> Read access tokens without trusting them, check the server side validation checklist, rotation and reuse detection, the OAuth code flow with PKCE, and API key scope, storage and rotation.

Canonical: https://codelivly.com/rooms/tokens-jwt-and-oauth-flows
Last updated: 2026-11-25

| | |
|---|---|
| Level | Intermediate |
| Category | Cybersecurity |
| Lessons | 6 |
| Estimated time | 3 h 35 min |
| XP | 1150 |

Ledgerline's API does not run on passwords. It runs on tokens and keys, and a flaw in how they are issued, checked or retired reaches every account at once. This room follows the authorised assessment on Thursday 2027-06-17, when the test accounts have walked the application and the client has supplied its token design, its negative test results and its logs. You decode tokens locally and compare their claims with the design, learn what a correct API verifies on every request, read refresh token events for rotation and reuse, check Ledgerline's own side of a partner sign in with PKCE and state, and review an API key inventory for scope, age and transport. The work is observation and recording: no token is forged, no key is tried and the partner provider stays out of scope. Every lesson has a terminal exercise and scenario questions that need judgment.

## Lessons

1. Reading Tokens Without Trusting Them (30 min)
2. JWT Validation Checklist: Signature, Claims and Lifetime (35 min)
3. Refresh Tokens, Rotation and Revocation (35 min)
4. OAuth Authorization Code Flow with PKCE (35 min)
5. API Keys: Scope, Storage and Rotation (30 min)
6. Guided Lab: Assess Token Handling on the Ledgerline API (50 min)

## Related

- [Learning path: Authentication, Sessions and Account Lifecycle](https://codelivly.com/learning-paths/authentication-sessions-and-account-lifecycle)
- [All rooms](https://codelivly.com/rooms)
