CommunicationTokenRefreshOptions interface

Options for auto-refreshing a Communication Token credential.

Properties

refreshProactively

Indicates whether the token should be proactively renewed prior to expiry or only renew on demand. By default false.

token

Optional token to initialize.

tokenRefresher

Callback function that returns a string JWT token acquired from the Communication Identity API. The returned token must be valid (expiration date must be in the future).

Property Details

refreshProactively

Indicates whether the token should be proactively renewed prior to expiry or only renew on demand. By default false.

refreshProactively?: boolean

Property Value

boolean

token

Optional token to initialize.

token?: string

Property Value

string

tokenRefresher

Callback function that returns a string JWT token acquired from the Communication Identity API. The returned token must be valid (expiration date must be in the future).

tokenRefresher: (abortSignal?: AbortSignalLike) => Promise<string>

Property Value

(abortSignal?: AbortSignalLike) => Promise<string>