PasskeyCredentialStore
Remembers the passkeys a house has registered, so an assertion can be checked against the right key. Registration writes a credential here; authentication reads it back by id to find the public key, and advances its sign counter afterward. The counter is the clone tripwire (§6.1.1 of WebAuthn): it must only ever climb, so the store must persist the last value it saw.
PasskeyCredentialStore::register()
abstract public function register(Milpa\Auth\WebAuthn\RegisteredCredential $credential): voidPersist a newly registered credential, keyed by its id.
Parameters
| Name | Type | Description |
|---|---|---|
| $credential | Milpa\Auth\WebAuthn\RegisteredCredential |
PasskeyCredentialStore::find()
abstract public function find(string $credentialId): ?Milpa\Auth\WebAuthn\RegisteredCredentialThe credential with this id, or null when the house never registered it.
Parameters
| Name | Type | Description |
|---|---|---|
| $credentialId | string |
PasskeyCredentialStore::updateSignCount()
abstract public function updateSignCount(string $credentialId, int $signCount): voidAdvance a credential's stored sign counter after a successful assertion.
Parameters
| Name | Type | Description |
|---|---|---|
| $credentialId | string | |
| $signCount | int |