Skip to main content

OAuth2TokenRequest

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.

Hierarchy

Index

Properties

optionalreadonlyacceptsType

acceptsType?: string

optionalreadonlyauthorization

authorization?: APIAuthorization

readonlycachePolicy

cachePolicy: HTTPCachePolicy

optionalreadonlycontentType

contentType?: string

optionalreadonlyheaders

headers?: [String: any]

readonlyhttpMethod

httpMethod: HTTPMethod

optionalreadonlyquery

query?: {}

Type declaration

  • [index string]: any

readonlytimeoutInterval

timeoutInterval: Number

readonlyurl

url: URL

Methods

optionalbody

  • body(): string
  • Function to generate the HTTP request body.

    @throws

    Error if the body could not be generated.


    Returns string

    Data for the body, or nil if no body is needed.

request

  • Composes a URLRequest for this object.


    Parameters

    Returns any

    Network instance for this API request.

send