Implement OAuth 2.0 Token Exchange (RFC 8693) for delegation and impersonation scenarios

domain: identity-general · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Confirm your authorization server supports RFC 8693 token exchange and that your client is pre-authorized to perform exchanges.
  2. POST to the token endpoint with grant_type=urn:ietf:params:oauth:grant-type:token-exchange, subject_token (the incoming token), subject_token_type (e.g., urn:ietf:params:oauth:token-type:access_token), and the desired requested_token_type.
  3. For delegation, also supply an actor_token and actor_token_type identifying the service acting on behalf of the subject.
  4. The authorization server validates both tokens, checks the may_act claim on the subject token to authorize the exchange, then issues a new token encoding both subject and actor claims.
  5. Inspect the issued_token_type in the response to confirm the returned token type, then pass the new token to the downstream service.
  6. Log the exchange event including subject, actor, and requested scopes for audit purposes.

Known gotchas

Related routes

Implement OAuth 2.0 Token Exchange (RFC 8693) for service-to-service delegation with subject_token validation
rfc-editor.org · 6 steps · unrated
Implement OAuth 2.0 DPoP (RFC 9449) sender-constrained tokens end to end
rfc-editor.org · 6 steps · unrated
Implement OAuth 2.0 authorization code flow with PKCE for a public client
oauth.net · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans