OAuth 2.0 Token Exchange Request

Overview#

OAuth 2.0 Token Exchange Request (value "urn:ietf:params:oauth:grant-type:token-exchange") is an Grant Type defined within the OAuth 2.0 Token Exchange specification.

NOT Restricted to OAuth Client#

The entity that makes a OAuth 2.0 Token Exchange Request is considered the client in the context of the token exchange interaction. However, that does not restrict usage of this profile to traditional OAuth Clients. An OAuth Resource Server, for example, might assume the role of the OAuth Client during OAuth 2.0 Token Exchange Request request in order to trade an Access Token, which it received in a Protected Resource request, for a new token that is appropriate to include in a call to a backend service. The new token might be an access token that is more narrowly scoped for the downstream service or it could be an entirely different kind of token.

The scope of the OAuth 2.0 Token Exchange Request specification is limited to the definition of a basic request and response protocol for an STS-style token exchange utilizing OAuth 2.0. Although a few new JWT claims are defined that enable delegation semantics to be expressed, the specific syntax, semantics and security characteristics of the tokens themselves (both those presented to the Authorization Server and those obtained by the client) are explicitly out of scope and no requirements are placed on the Trust Model in which an implementation might be deployed. Additional profiles may provide more detailed requirements around the specific nature of the parties and Trust Model involved, such as whether signing and/or encryption of tokens is required; however, such details will often be policy decisions made with respect to the specific needs of individual deployments and will be configured or implemented accordingly.

The security tokens obtained could be used in a number of contexts, the specifics of which are also beyond the scope of OAuth 2.0 Token Exchange.

2.1. Request#

A OAuth Client requests a security token by making a token request to the Authorization Server's token_endpoint using the extension grant type mechanism defined in Section 4.5 of OAuth 2.0 RFC 6749.

Client authentication to the Authorization Server is done using the normal mechanisms provided by OAuth 2.0. The supported methods of client authentication and whether or not to allow unauthenticated or unidentified clients are deployment decisions that are at the discretion of the Authorization Server.

The client makes a OAuth 2.0 Token Exchange Request Grant Type request to the token_endpoint with an extension grant type by including the following parameters using the "application/x-www-form-urlencoded" format with a character encoding of UTF-8 in the HTTP Request entity-body:

More Information#

There might be more information for this subject on one of the following: