Tokens and resource servers
What access and refresh tokens contain, how APIs validate them, scopes and audiences, introspection and revocation.
Start with Using access tokens
- Using access tokensSend an access token the way APIs expect, treat it as opaque, replace it before it expires, read WWW-Authenticate errors, and keep it away from other hosts.
- Token formats and validationCompare reference tokens with self-contained JWT access tokens, read the JWT access token profile, and follow the photo API through its validation checks and a key rotation.
- Scopes and audiencesSee why a token names both what it allows and which API may accept it, how the audience is chosen, and how to design scopes that stay useful.
- Enforcing access at an APIFollow an API from a validated token to a decision: map routes to scopes, check each object against the user, and choose between 401, 403, and 404.
- Refresh tokens and rotationSee what an authorization server stores for refresh tokens, how idle and absolute lifetimes work together, how to rotate atomically, and which events should end a token family.
- Token introspectionFollow an API as it asks the authorization server about a token, reads active and inactive answers, caches them safely, and fails closed when no answer comes.
- Token revocationRevoke a refresh token when a person disconnects, see what revocation can and cannot reach, and compare a client revoking its tokens with a person removing the connection.