OAuth 2.0
Token Exchange — Delegation
Demonstrating RFC 8693 Token Exchange for delegation. A frontend passes a token to an API, which exchanges it to call a downstream service, building a chain of custody using nested 'act' claims.
POST https://api.example.com/payments/checkout200
The user (Alice) initiates an action from the Frontend Application. The Frontend sends a standard OAuth 2.0 Access Token to the Payment API.
1 / 4
speed
Step 1: POST /checkout
Request / response
POSThttps://api.example.com/payments/checkout
AuthorizationOAuth?
Bearer eyJ0eXAiOiJhdCtqd3QiLCJhbGciOiJIUzI1NiJ9...
Content-Type?
application/json
Body
{
"cart_id": "12345"
}Frontend Access Tokenat+jwt
Header
{"typ"?:"at+jwt","alg":"HS256"}Payload
{"iss"?:"https://auth.example.com","sub"?:"alice","aud"?:"payment_api","exp"?:1562266216,"iat"?:1562262616}sig: mock_sig…