Callback
Less than 1 minute
Callback
A provider built from callables.
class Callback implements \Hazaar\Auth\Interface\UserProvider , \Hazaar\Auth\Interface\PasswordStoreImplements: Hazaar\Auth\Interface\UserProvider, Hazaar\Auth\Interface\PasswordStore
Hazaar\Auth\Adapter uses this to wrap adapters written before providers existed, which implement queryAuth() and storeCredentialHash() themselves. It is also handy in tests.
Properties
find
private \Closure $findType: Closure
getPasswordHash
private \Closure $getPasswordHashType: Closure
setPasswordHash
private \Closure $setPasswordHashType: Closure
Methods
__construct
public __construct(\Closure $find, \Closure $getPasswordHash, \Closure $setPasswordHash): voidParameters
| Parameter | Type | Description |
|---|---|---|
$find | Closure | |
$getPasswordHash | Closure | |
$setPasswordHash | Closure |
findByIdentity
public findByIdentity(string $identity): ?IdentityReturns: Hazaar\Auth\Identity
Parameters
| Parameter | Type | Description |
|---|---|---|
$identity | string |
getPasswordHash
public getPasswordHash(string $identity): ?stringReturns: string
Parameters
| Parameter | Type | Description |
|---|---|---|
$identity | string |
setPasswordHash
public setPasswordHash(string $identity, string $hash): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$identity | string | |
$hash | string |
Generated by Hazaar API Doc Generator on Wed, 28 Oct 2026 08:43:30 +0000