DBITable
DBITable
Database-table backed authentication adapter.
class DBITable extends \Hazaar\Auth\Adapter implements \Hazaar\Auth\Interface\AuthenticationAdapterExtends: Hazaar\Auth\Adapter
Implements: Hazaar\Auth\Interface\AuthenticationAdapter
This adapter authenticates identities against a DBI table and maps configured identity/credential columns into the normalized auth payload expected by the base adapter (identity, credential, and optional data).
In addition to lookup-based authentication, it provides helper methods for creating, updating, and deleting credential records in the configured table. Credential values are hashed using the inherited adapter hashing policy before persistence.
Properties
table
DBI table gateway used for authentication record queries and mutations.
private Table $tableType: Hazaar\DBI\Table
Methods
__construct
Construct the new authentication object with the field names
public __construct(DBIAdapter $dbi, Options $options = 'new Options()'): voidin the model for id, user name, password and real name.
Parameters
| Parameter | Type | Description |
|---|---|---|
$dbi | Hazaar\DBI\Adapter | |
$options | Hazaar\Auth\Adapter\DBITable\Options |
queryAuth
Queries authentication data for a given identity.
public queryAuth(string $identity): array|boolReturns: array|bool
Returns a normalized auth structure containing identity, credential, and remaining record fields under data.
Parameters
| Parameter | Type | Description |
|---|---|---|
$identity | string | user identity to look up |
create
Creates a new authentication record.
public create(string $identity, string $credential): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$identity | string | identity value to persist |
$credential | string | plaintext credential that will be hashed before storage |
update
Updates credential data for an existing identity.
public update(string $identity, string $credential): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$identity | string | identity value to update |
$credential | string | plaintext credential that will be hashed before storage |
delete
Deletes an authentication record for the given identity.
public delete(string $identity): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$identity | string | identity value to delete |
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:17 +0000