PasskeyCredentialStore
PasskeyCredentialStore
Passkeys stored in a database table.
class PasskeyCredentialStore implements \Hazaar\Auth\Interface\PasskeyCredentialStoreImplements: Hazaar\Auth\Interface\PasskeyCredentialStore
The application creates the table, typically in a dbitool migration. Hazaar\Auth\Store\DBI\SCHEMA is portable SQL for it (SQLite, PostgreSQL, MySQL); replace passkeys with the configured table name. Binary values are stored as base64url text and flags as 0/1 integers, so no database-specific types are needed.
Constants
string
public const string = nullProperties
options
private Options $optionsType: Hazaar\Auth\Store\DBI\PasskeyCredentialStore\Options
dbi
the database to use, instead of the one in $config['dbi']
private DBIAdapter $dbiType: Hazaar\DBI\Adapter
Methods
__construct
public __construct(array|Options $config, DBIAdapter $dbi): voidParameters
| Parameter | Type | Description |
|---|---|---|
$config | array | Hazaar\Auth\Store\DBI\PasskeyCredentialStore\Options |
$dbi | Hazaar\DBI\Adapter | the database to use, instead of the one in $config['dbi'] |
findById
public findById(string $credentialId): ?PasskeyCredentialReturns: Hazaar\Auth\WebAuthn\PasskeyCredential
Parameters
| Parameter | Type | Description |
|---|---|---|
$credentialId | string |
findByIdentity
public findByIdentity(string $identity): arrayReturns: array
Parameters
| Parameter | Type | Description |
|---|---|---|
$identity | string |
findIdentityByUserHandle
public findIdentityByUserHandle(string $userHandle): ?stringReturns: string
Parameters
| Parameter | Type | Description |
|---|---|---|
$userHandle | string |
getUserHandle
public getUserHandle(string $identity): ?stringReturns: string
Parameters
| Parameter | Type | Description |
|---|---|---|
$identity | string |
save
public save(PasskeyCredential $credential): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$credential | Hazaar\Auth\WebAuthn\PasskeyCredential |
recordUse
public recordUse(string $credentialId, int $signCount, bool $backupState, int $usedAt): voidReturns: void
Parameters
| Parameter | Type | Description |
|---|---|---|
$credentialId | string | |
$signCount | int | |
$backupState | bool | |
$usedAt | int |
rename
public rename(string $identity, string $credentialId, string $name): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$identity | string | |
$credentialId | string | |
$name | string |
delete
public delete(string $identity, string $credentialId): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$identity | string | |
$credentialId | string |
table
A fresh Table for each query: a Table keeps the columns of an earlier select (by design, for fluent use), so
private table(): TableReturns: Hazaar\DBI\Table
reusing one would make a later query return only the columns an earlier one asked for.
Generated by Hazaar API Doc Generator on Wed, 28 Oct 2026 08:43:30 +0000