Methods
Convert a timeout array in second
arrayToIntTimeout(array<mixed,integer> $data) : integer
Static
Parameters
$data
array<mixed,integer>unit => value
Returns
integerseconds
Retrieve user by ID
findFromId(string $id) : \sso\SsoUser | NULL
Static
Parameters
$id
stringuser Id to retrieve
Returns
\sso\SsoUserNULLreturn NULL if user table does not exists at all, return a new SsoUser if the user does not exists in table
Return group element type
getGroupType()
Static
| see |
|
| inherited_from |
\sso\SsoGroupable::getGroupType() |
Retrieve the user based of SSO database informations, used for initialize the SSO
getInitUser() : \sso\SsoUser
Static
Returns
\sso\SsoUserA user with login and password of the database
Field name that contain name of group element
getNameField()
| see |
|
| inherited_from |
\sso\SsoGroupable::getNameField() |
Convert seconds to timeout array
intTimeoutToArray(integer $int) : array<mixed,integer>
Static
Parameters
$int
integertimeout in seconds
Returns
array<mixed,integer>data timeout as unit => value
Check a user is enabled
isEnabled() : boolean
Returns
booleanTRUE if user enabled, FALSE otherwise
Retrieve objects
search(array<mixed,mixed> $criteria, \salt\Pagination $pagination = NULL)
Static
| see |
|
| inherited_from |
\sso\SsoAdministrable::search() |
Parameters
$criteria
array<mixed,mixed>criteria as key => value
$pagination
\salt\Paginationpagination object
Return a range for a unit
unitRange(string $unit) : array<mixed,integer>
Static
Parameters
$unit
stringunit in [dhm] (day, hours, minutes)
Returns
array<mixed,integer>range for the unit : hours will return array(0, ..., 23)
Register a failed login attempt
updateLoginFailed(string $id) : boolean
Static
Parameters
Returns
booleanTRUE if user exists
Register a successfull access for user
updateLoginOk(string $id, \sso\AuthUser $authUser) : \sso\SsoUser
Static
Parameters
$authUser
\sso\AuthUserThe AuthUser object from an auth method
Exceptions
Returns
\sso\SsoUserThe SsoUser (created if it's his first access)
Properties
Used to convert interval data to timeout
$CONVERT_TIMEOUT
Default
array('d' => 86400, 'h' => 3600, 'm' => 60)
Static
Used to generate select of timeout element
$TIME_RANGE
Default
array('d' => 7, 'h' => 23, 'm' => 59)
Static
$auth_group
$auth_group : integer
$can_ask
$can_ask : boolean
$failed_login_count
$failed_login_count : integer
$last_failed_login
$last_failed_login : integer
$last_login
$last_login : integer
$login_count
$login_count : integer
$password
$password : string
$restrictAgent
$restrictAgent : boolean
$restrictIP
$restrictIP : boolean
$timeout
$timeout : integer
Constants
Default timeout
DEFAULT_TIMEOUT = 259200
State disabled
STATE_DISABLED = 0
State enabled
STATE_ENABLED = 1
State pending to administrator validation
STATE_TO_VALIDATE = 2