Atomically records a challenge as used until expiresAt, answering false on a second claim.
Deletes a credential.
Reads one credential by id, or null when it is not stored.
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.
Atomically stores a newly registered credential, refusing an id that is
already present or a principal already at maxPerPrincipal, and copying
the record (its array and JWK members
included) so a later mutation of the caller's object cannot change what
the store hands back.
Atomically advances the stored counter to observed, reporting whether it did.
The in-memory passkey store.
Challenge claims past their expiry are purged so the map stays bounded (the
MemoryLocklesson): 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.