Interface CredentialChainOptions

Options for resolving the credential chain.

interface CredentialChainOptions {
    accessToken?: string;
    accessTokenProvider?: () => string | Promise<string>;
    accountId?: string;
    apiKey?: string;
    apiKeyHeader?: string;
    autoRefresh?: boolean;
    configDir?: string;
    fetch?: FetchLike;
    profile?: string;
}

Properties

accessToken?: string

Explicit static bearer token.

accessTokenProvider?: () => string | Promise<string>

Dynamic bearer token provider.

accountId?: string

Account ID override (takes precedence over profile's sso_account_id).

apiKey?: string

Explicit API key (highest priority).

apiKeyHeader?: string

Header name for API key auth.

autoRefresh?: boolean

Whether to auto-refresh expired SSO tokens. Defaults to true.

configDir?: string

Override config directory path.

fetch?: FetchLike

fetch implementation for token refresh.

profile?: string

Name of the profile from ~/.seclai/config.