Token responses and failures
08A successful token response describes the credential. An error response must not be mistaken for one.
A rejected grant must not be processed as a successful authorization.
Key idea: Parse success and failure deliberately.
Rules & examples
Parse success and failure deliberately.
- Success includes access_token and token_type; expires_in is recommended, and scope is returned when it differs from the request.
- Token responses containing credentials use Cache-Control: no-store and Pragma: no-cache.
- Errors include invalid_request, invalid_client, invalid_grant, unauthorized_client, unsupported_grant_type, and invalid_scope.
OAuth does not mandate one universal access-token serialization. The token type determines how it is used.
Sources
New to this? Start hereA quick picture + helpful background
A key is different from permission.
An app, a person, and a server have different roles. Follow who asks, who grants permission, and who checks the credential. A key in the drawing is an analogy, not a literal protocol field.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.