class SimpleAuthenticator implements Authenticator

Trivial implementation of Authenticator.

Methods

__construct(array $passwords, array $roles = [], array $data = [], Passwords|null $verifier = null)

No description

authenticate(string $username, string $password)

Performs an authentication against e.g. database.

bool
verifyPassword(string $password, string $passOrHash)

No description

Details

at line 23
__construct(array $passwords, array $roles = [], array $data = [], Passwords|null $verifier = null)

No description

Parameters

array $passwords

list of pairs username => password

array $roles

list of pairs username => role[]

array $data

list of pairs username => mixed[]

Passwords|null $verifier

at line 38
IIdentity authenticate(string $username, string $password)

Performs an authentication against e.g. database.

and returns IIdentity on success or throws AuthenticationException

Parameters

string $username
string $password

Return Value

IIdentity

Exceptions

AuthenticationException

at line 58
protected bool verifyPassword(string $password, string $passOrHash)

No description

Parameters

string $password
string $passOrHash

Return Value

bool