auth.provider API
    Preparing search index...

    Interface SessionFederationIndex

    Sid-keyed index of upstream federation provider names that have authenticated this session. Per A4 §5.4.

    Source data for: (a) cascade federation logout; (b) federation token route gating (isFederationLinked(sid, name) semantics).

    Ordering contract (load-bearing): listFederations(sid) MUST return federation names in INSERTION order (oldest first). routes/logout.mts consumes the first element to choose the IdP for post-logout redirect.

    Mutability: append-only (idempotent on duplicate name) + per-federation removal (removeFederation(sid, name)) for federation logout completion + full cleanup via removeBySid.

    TTL contract: every addFederation MUST be called with the session's expiresAt.

    interface SessionFederationIndex {
        kind: string;
        addFederation(
            sid: string,
            federationName: string,
            expiresAt: Date,
        ): Promise<void>;
        listFederations(sid: string): Promise<readonly string[]>;
        removeBySid(sid: string): Promise<void>;
        removeFederation(sid: string, federationName: string): Promise<void>;
    }
    Index

    Properties

    kind: string

    Methods

    • Expiry encoding: Date per A4 two-tier design — see UserSession for rationale.

      Parameters

      • sid: string
      • federationName: string
      • expiresAt: Date

      Returns Promise<void>