@lgriffin/esi.ts - EVE Online ESI API Client - v12.3.0
    Preparing search index...

    Interface EsiTokenManagerConfig

    interface EsiTokenManagerConfig {
        clientId: string;
        clientSecret?: string;
        callbackUrl?: string;
        storage?: ITokenStorage;
        ssoClient?: EveSsoClient;
        fetch?: FetchLike;
        ssoTimeoutMs?: number;
        refreshSkewMs?: number;
        autoRefresh?: boolean;
        onRefresh?: (token: StoredToken) => void;
        onRefreshError?: (characterId: number, error: Error) => void;
        onRevoked?: (characterId: number) => void;
        logger?: ILogger;
        verifyTokens?: boolean;
        now?: () => number;
    }
    Index
    clientId: string

    The application's SSO client id.

    clientSecret?: string

    The application's SSO client secret. Omit for a public (PKCE) client.

    callbackUrl?: string

    Redirect URI registered for the application.

    storage?: ITokenStorage

    Where tokens are persisted. Defaults to MemoryTokenStorage.

    ssoClient?: EveSsoClient

    Pre-built SSO client. When given, clientId, clientSecret, callbackUrl, fetch and ssoTimeoutMs are ignored for SSO calls.

    fetch?: FetchLike

    Custom fetch for SSO calls. Defaults to globalThis.fetch.

    ssoTimeoutMs?: number

    Timeout for each SSO call, in milliseconds; see EveSsoClientConfig.timeoutMs. Unset by default. With a locking store, keep it well below the lock's stale timeout so a hung refresh ends before another process breaks its lock. Ignored with ssoClient.

    refreshSkewMs?: number

    How long before expiry a token counts as stale, in milliseconds. Defaults to 60 000 (one minute).

    autoRefresh?: boolean

    When true (the default), EsiTokenManager.getToken refreshes a stale token before returning it. When false it returns the stored token as-is and refresh only happens through EsiTokenManager.refresh, EsiTokenManager.refreshAll, or the 401 path of a created client.

    onRefresh?: (token: StoredToken) => void

    Called after a token is refreshed and persisted.

    onRefreshError?: (characterId: number, error: Error) => void

    Called when a refresh fails for a reason other than revocation.

    onRevoked?: (characterId: number) => void

    Called when SSO reports a character's refresh token as invalid.

    logger?: ILogger

    Logger for refresh activity. Defaults to the library logger, resolved at each log call so a later global setLogger() applies.

    verifyTokens?: boolean

    Verify the RS256 signature of access tokens against EVE SSO's published key set (JWKS) in EsiTokenManager.addCharacter and EsiTokenManager.importToken, and check their iss, aud and exp claims. Turn this on when tokens can reach the manager from anywhere but SSO's token endpoint. Defaults to false. Keys are fetched with fetch and cached.

    now?: () => number

    Clock override for tests.