class SimpleAuthenticator implements Authenticator

Trivial implementation of Authenticator.

Methods

__construct(array $userlist, array $usersRoles = [], array $usersData = [])

No description

authenticate(string $username, string $password = null)

Performs an authentication against e.g. database.

Details

at line 34
__construct(array $userlist, array $usersRoles = [], array $usersData = [])

No description

Parameters

array $userlist

list of pairs username => password

array $usersRoles

list of pairs username => role[]

array $usersData

list of pairs username => mixed[]

at line 47
IIdentity authenticate(string $username, string $password = null)

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

Traits

Strict class for better experience.