@grow-codes/openbao - v0.1.2
    Preparing search index...

    Interface TokenRenewerOptions

    Options of TokenRenewer.

    interface TokenRenewerOptions {
        incrementMs?: number;
        minDelayMs?: number;
        onError?: (error: unknown) => void;
        onExpire?: () => void;
        onRenew?: (info: TokenRenewal) => void;
        reauth?: AuthMethod;
        renewFraction?: number;
        scheduler?: Scheduler;
    }

    Hierarchy (View Summary)

    Index
    incrementMs?: number

    Requested TTL for each renewal in ms. Default: the server's default for the token/lease. A renewal that grants less than the requested TTL (or less than the initial TTL when no increment is set) means the maximum TTL was reached.

    minDelayMs?: number

    Shortest delay between two attempts in ms (default 500).

    onError?: (error: unknown) => void

    Called with every failed attempt. Renewal goes on while time is left.

    onExpire?: () => void

    Called exactly once when the token/lease expires and cannot be renewed any more.

    onRenew?: (info: TokenRenewal) => void

    Called after every renewal or re-login with the new token TTL.

    reauth?: AuthMethod

    Logs in again with this method when the token cannot be renewed any more (not renewable or maximum TTL reached). Without it, onExpire is called at expiry.

    renewFraction?: number

    Renew after this fraction of the TTL has passed (default 2/3).

    scheduler?: Scheduler

    Clock and timers (tests).