PasswordAuthenticator
Less than 1 minute
PasswordAuthenticator
Verifies an identity and password against a Hazaar\Auth\Interface\PasswordStore.
class PasswordAuthenticatorIt only verifies. It never starts a session: pass the returned Hazaar\Auth\Identity to Hazaar\Auth\SessionManager::login for that.
Properties
dummyHash
public string $dummyHashType: string
users
private PasswordStore&UserProvider $usersType: Hazaar\Auth\Interface\PasswordStore&Hazaar\Auth\Interface\UserProvider
hasher
private PasswordHasher $hasherType: Hazaar\Auth\Interface\PasswordHasher
Methods
__construct
public __construct(PasswordStore&UserProvider $users, PasswordHasher $hasher): voidParameters
| Parameter | Type | Description |
|---|---|---|
$users | Hazaar\Auth\Interface\PasswordStore&Hazaar\Auth\Interface\UserProvider | |
$hasher | Hazaar\Auth\Interface\PasswordHasher |
verify
Checks an identity's password.
public verify(string $identity, string $password): IdentityReturns: Hazaar\Auth\Identity
On success, a stored hash the hasher reports as out of date is replaced with a fresh one. A failure to store it doesn't fail the login, since the old hash still works.
Parameters
| Parameter | Type | Description |
|---|---|---|
$identity | string | |
$password | string |
Generated by Hazaar API Doc Generator on Wed, 28 Oct 2026 08:43:30 +0000