ClientRepository
ClientRepository
Default DBI-backed Hazaar\OAuth\Interface\ClientRepository implementation.
class ClientRepository implements \Hazaar\OAuth\Interface\ClientRepositoryImplements: Hazaar\OAuth\Interface\ClientRepository
Expects a table (default oauth_clients) with columns client_id (primary key), client_secret_hash, redirect_uris, grant_types, response_types, token_endpoint_auth_method, client_name, scope and client_id_issued_at. The array-valued columns (redirect_uris, grant_types, response_types, scope) are stored as JSON text, so any text/varchar/json column type works — this implementation does not require or provide a schema migration.
Configuration (oauth.server.clients_options):
database(string|array, optional): passed to Hazaar\DBI\Adapter::create. Defaults to the application's default database connection.table(string, optional): table name. Defaults tooauth_clients.
Properties
table
private Table $tableType: Hazaar\DBI\Table
Methods
__construct
public __construct(array|Options $options = 'new Options()'): voidParameters
| Parameter | Type | Description |
|---|---|---|
$options | array | Hazaar\OAuth\Store\DBI\Options |
find
public find(string $clientId): ?ClientReturns: Hazaar\OAuth\Client
Parameters
| Parameter | Type | Description |
|---|---|---|
$clientId | string |
save
public save(Client $client): voidReturns: void
Parameters
| Parameter | Type | Description |
|---|---|---|
$client | Hazaar\OAuth\Client |
hydrate
private hydrate(array $record): ClientReturns: Hazaar\OAuth\Client
Parameters
| Parameter | Type | Description |
|---|---|---|
$record | array |
Generated by Hazaar API Doc Generator on Sun, 23 Aug 2026 10:49:43 +0000