Skip to main content

OAuth2Credential

openmolt


openmolt / OAuth2Credential

Interface: OAuth2Credential

Defined in: types/index.ts:185

OAuth 2.0 credential assigned to an agent.

Properties​

config​

config: object

Defined in: types/index.ts:187

Index Signature​

[key: string]: unknown

accessToken?​

optional accessToken: string

clientId​

clientId: string

clientSecret​

clientSecret: string

expiryDate?​

optional expiryDate: string

refreshToken​

refreshToken: string


onTokenRefresh()?​

optional onTokenRefresh: (newConfig) => Promise<void>

Defined in: types/index.ts:196

Called after every successful token refresh so callers can persist the new tokens.

Parameters​

newConfig​
accessToken?​

string

clientId​

string

clientSecret​

string

expiryDate?​

string

refreshToken​

string

Returns​

Promise<void>


type​

type: "oauth2"

Defined in: types/index.ts:186