OAuth2TokenRequest
Hierarchy
- APIRequest<Token>
- OAuth2TokenRequest
Index
Properties
optionalreadonlyacceptsType
optionalreadonlyauthorization
readonlycachePolicy
optionalreadonlycontentType
optionalreadonlyheaders
readonlyhttpMethod
optionalreadonlyquery
Type declaration
[index string]: any
readonlytimeoutInterval
readonlyurl
Methods
optionalbody
Function to generate the HTTP request body.
Returns string
Data for the body, or
nilif no body is needed.
request
Composes a URLRequest for this object.
Parameters
forClient: APIClient
Returns any
Network instance for this API request.
send
Asynchronously sends the request to the given APIClient.
Parameters
toClient: APIClient
optionalparsingContext: APIParsingContext
Returns Promise<APIResponse<Token>>
Response result of the request.
Interface that represents a type of APIRequest that can be used to exchange a token.
Many different OAuth2 authentication flows can issue tokens, but the types of arguments and their particular workflow can differ. This protocol abstracts the necessary interface for requests that are capable of returning tokens, while allowing the specific arguments and validation steps to be implemented for each unique type of flow.
In languages with support for namespacing, this type should be contained within the OAuth2Client namespace.