Setu-TS
    Preparing search index...

    Class MemoryPasskeyStore

    The in-memory passkey store.

    Challenge claims past their expiry are purged so the map stays bounded (the MemoryLock lesson): a store that only grows would hand a long-running process an unbounded map keyed by attacker-supplied challenges. The sweep is AMORTIZED — it runs when the map has doubled since the previous one — because a full scan on every claim is quadratic in the live claims, and claims are reachable from unauthenticated requests. The map therefore holds at most twice the claims that are live at the last sweep.

    Implements

    Index
    • Lists every credential registered for a principal.

      The methods are NOT async — they resolve synchronously, the same shape the other memory stores ship — because an async method with no await is a lint failure, and the port's async signature is what a remote backend needs, not the memory one.

      Parameters

      • principalId: string

      Returns Promise<readonly StoredPasskey[]>