DBITable
DBITable
Database-table backed authentication adapter.
class DBITable extends \Hazaar\Auth\Adapter\Adapter implements \Hazaar\Auth\Adapter\AuthenticationAdapterThis 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 $tableMethods
__construct
Construct the new authentication object with the field names
public __construct(DBIAdapter $dbi, array $config): voidin the model for id, user name, password and real name.
Parameters
| Parameter | Type | Description |
|---|---|---|
$dbi | DBIAdapter | |
$config | array |
queryAuth
Queries authentication data for a given identity.
public queryAuth(string $identity, bool $): voidReturns a normalized auth structure containing identity, credential, and remaining record fields under data.
Parameters
| Parameter | Type | Description |
|---|---|---|
$identity | string | user identity to look up |
$ | bool |
create
Creates a new authentication record.
public create(string $identity, string $credential): boolParameters
| 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): boolParameters
| 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): boolParameters
| Parameter | Type | Description |
|---|---|---|
$identity | string | identity value to delete |
Generated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:24 +0000