class SimpleAuthenticator implements IAuthenticator

Trivial implementation of IAuthenticator.

Traits

Strict class for better experience.

Methods

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

No description

authenticate(array $credentials)

Performs an authentication against e.g. database.

Details

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

Parameters

array $userlist list of pairs username => password
array $usersRoles list of pairs username => role[]

at line 45
IIdentity authenticate(array $credentials)

Performs an authentication against e.g. database.

and returns IIdentity on success or throws AuthenticationException

Parameters

array $credentials

Return Value

IIdentity

Exceptions

AuthenticationException