WebAuthnCredentialStore
The registry of registered passkeys — the WebAuthn public-key store. Mirrors {@see \Milpa\Auth\Contracts\SessionStore}: the leaf declares WHAT it needs, the host implements HOW (Doctrine, etc.). Two invariants the contract REQUIRES and the implementation MUST enforce: global `credentialId` uniqueness (usernameless login resolves a user by credential id alone), and that `updateSignCount` records the latest counter — which is a clone-detection SIGNAL, never an authorization gate.
WebAuthnCredentialStore::save()
abstract public function save(Milpa\Auth\WebAuthn\WebAuthnCredentialRecord $record): voidPersist a newly registered credential. MUST reject a duplicate credentialId (global uniqueness).
Parameters
| Name | Type | Description |
|---|---|---|
| $record | Milpa\Auth\WebAuthn\WebAuthnCredentialRecord |
WebAuthnCredentialStore::findByCredentialId()
abstract public function findByCredentialId(string $credentialId): ?Milpa\Auth\WebAuthn\WebAuthnCredentialRecordThe credential with this id, or null if unknown (the usernameless/discoverable lookup).
Parameters
| Name | Type | Description |
|---|---|---|
| $credentialId | string |
WebAuthnCredentialStore::listForActor()
abstract public function listForActor(string $actorId): arrayThe actor's credentials — builds a ceremony's allowCredentials.
Parameters
| Name | Type | Description |
|---|---|---|
| $actorId | string |
WebAuthnCredentialStore::updateSignCount()
abstract public function updateSignCount(string $credentialId, int $signCount): voidRecord the latest sign counter for a credential after an assertion (a signal, not a gate).
Parameters
| Name | Type | Description |
|---|---|---|
| $credentialId | string | |
| $signCount | int |