API referenceInterfaces
TokenExchangeOptions
Generated API reference for TokenExchangeOptions in @kysoql/auth.
@kysoql/auth / TokenExchangeOptions
Options for Salesforce OAuth 2.0 token exchange.
Extends
TokenEndpointOptions.OAuthClientAuthentication
Properties
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
clientId | readonly | string | Connected App consumer key / OAuth client ID. | - |
subjectToken | readonly | string | Token being exchanged. | - |
subjectTokenType | readonly | TokenExchangeSubjectTokenType | RFC token-type identifier describing subjectToken. | - |
scope? | readonly | string | readonly string[] | Scopes requested for the exchanged token. | - |
tokenHandler? | readonly | string | Salesforce token-handler URL or identifier used for token exchange, when required. | - |
loginUrl | readonly | string | Salesforce login or My Domain base URL for the token endpoint. | TokenEndpointOptions.loginUrl |
refreshTokenStore? | readonly | RefreshTokenStore | Persist a newly issued/rotated refresh token before returning the session. | TokenEndpointOptions.refreshTokenStore |
signal? | readonly | AbortSignal | Cancels this request. | TokenEndpointOptions.signal |
timeoutMs? | readonly | number | Per HTTP request. Default: 30 seconds. | TokenEndpointOptions.timeoutMs |
fetch? | readonly | (input, init?) => Promise<Response> | Native fetch by default. Primarily useful for tests and custom runtimes. | TokenEndpointOptions.fetch |
clientSecret? | readonly | string | Use only from a confidential client that can keep this secret. | OAuthClientAuthentication.clientSecret |
clientAssertion? | readonly | string | JWT client assertion accepted by Salesforce instead of clientSecret. | OAuthClientAuthentication.clientAssertion |
clientSecretTransport? | readonly | "body" | "basic" | Default: body. Salesforce also accepts HTTP Basic for client secrets. | OAuthClientAuthentication.clientSecretTransport |