Interface for Authentication Methods

package sso\lib\dao\auths

 Methods

Try to authenticate a user

auth(string $user, string $pass, \sso\stdClass $options) : \sso\AuthUser | NULL

Parameters

$user

string

user

$pass

string

clear password

$options

\sso\stdClass

all auth method options

Returns

\sso\AuthUserNULLan AuthUser if user found or NULL otherwise.
If password is OK, call AuthUser->logged() before return.
If an error occured, throw an exception or set an error on user with AuthUser->addError(errorMessage). The errorMessage will be displayed after bad password error.

Options of the method

getOptions(array<mixed,mixed> $value = NULL) : array<mixed,\salt\Field>

Parameters

$value

array<mixed,mixed>

current values, as key => value, each key is a Field name of a previous call. Can be used for display example of current option values in option description for example.

Returns

array<mixed,\salt\Field>all options