OAuthModel interface

Model for API authentication with OAuth2.

Extends

Properties

accessTokenPrepend

Access token prepend. Default is 'Bearer'.

authorizationCode

The user's authorization code.

authorizationEndpoint

The authorization endpoint.

authorizationEndpointHeaders

The authorization endpoint headers.

authorizationEndpointQueryParameters

The authorization endpoint query parameters.

clientId

The Application (client) ID that the OAuth provider assigned to your app.

clientSecret

The Application (client) secret that the OAuth provider assigned to your app.

grantType

The grant type, usually will be 'authorization code'.

isCredentialsInHeaders

Indicating whether we want to send the clientId and clientSecret to token endpoint in the headers.

isJwtBearerFlow

A value indicating whether it's a JWT flow.

redirectUri

The Application redirect url that the user config in the OAuth provider.

scope

The Application (client) Scope that the OAuth provider assigned to your app.

tokenEndpoint

The token endpoint. Defines the OAuth2 refresh token.

tokenEndpointHeaders

The token endpoint headers.

tokenEndpointQueryParameters

The token endpoint query parameters.

type

The auth type

Property Details

accessTokenPrepend

Access token prepend. Default is 'Bearer'.

accessTokenPrepend?: string

Property Value

string

authorizationCode

The user's authorization code.

authorizationCode?: string

Property Value

string

authorizationEndpoint

The authorization endpoint.

authorizationEndpoint?: string

Property Value

string

authorizationEndpointHeaders

The authorization endpoint headers.

authorizationEndpointHeaders?: Record<string, string>

Property Value

Record<string, string>

authorizationEndpointQueryParameters

The authorization endpoint query parameters.

authorizationEndpointQueryParameters?: Record<string, string>

Property Value

Record<string, string>

clientId

The Application (client) ID that the OAuth provider assigned to your app.

clientId: string

Property Value

string

clientSecret

The Application (client) secret that the OAuth provider assigned to your app.

clientSecret: string

Property Value

string

grantType

The grant type, usually will be 'authorization code'.

grantType: string

Property Value

string

isCredentialsInHeaders

Indicating whether we want to send the clientId and clientSecret to token endpoint in the headers.

isCredentialsInHeaders?: boolean

Property Value

boolean

isJwtBearerFlow

A value indicating whether it's a JWT flow.

isJwtBearerFlow?: boolean

Property Value

boolean

redirectUri

The Application redirect url that the user config in the OAuth provider.

redirectUri?: string

Property Value

string

scope

The Application (client) Scope that the OAuth provider assigned to your app.

scope?: string

Property Value

string

tokenEndpoint

The token endpoint. Defines the OAuth2 refresh token.

tokenEndpoint: string

Property Value

string

tokenEndpointHeaders

The token endpoint headers.

tokenEndpointHeaders?: Record<string, string>

Property Value

Record<string, string>

tokenEndpointQueryParameters

The token endpoint query parameters.

tokenEndpointQueryParameters?: Record<string, string>

Property Value

Record<string, string>

type

The auth type

type: "OAuth2"

Property Value

"OAuth2"