Skip to content

@egain/ai-agent-sdk API Reference - v0.3.2 / PreAuthConfig

Interface: PreAuthConfig ​

Configuration for pre-auth authentication strategy

Table of contents ​

Properties ​

Properties ​

accessToken ​

• accessToken: string

Access token to use directly

Defined in ​

core/auth/PreAuthStrategy.ts:20


refreshTokenFn ​

• Optional refreshTokenFn: () => Promise<string>

Optional token refresh function If provided, will be called when token needs to be refreshed

Type declaration ​

▸ (): Promise<string>

Returns ​

Promise<string>

Defined in ​

core/auth/PreAuthStrategy.ts:26


expiryBufferMs ​

• Optional expiryBufferMs: number

Buffer time in milliseconds before token expiry to trigger the expiring event

Default

ts
{@link ACCESS_TOKEN_REFRESH_BUFFER_MS} (5 minutes)

Defined in ​

core/auth/PreAuthStrategy.ts:32

Released under the MIT License.