Methods
Retrieve a session variable
__get(string $var) : mixed
Parameters
Returns
mixedvalue
Test if variable exists
__isset(string $var) : boolean
Parameters
Returns
booleanTRUE if variable exists in session, FALSE otherwise
Set a variable in session
__set(string $var, mixed $value)
Parameters
$value
mixedvariable value
Remove a variable from session
__unset(string $var)
display session content (debug only)
dump()
Freeze current session data and restore previous session
freeze()
All SSO session data can still be retrieve from Session instance but cannot be modified
Retrieve SSO instance
getInstance() : \sso\Session
Static
Returns
\sso\Sessionnew or current instance
Register logged user in session
login(integer $timeout, \sso\AuthUser $authUser, \sso\SsoUser $ssoUser, array<mixed,string> $credentials)
Parameters
$timeout
integertimeout of the session
$authUser
\sso\AuthUseruser of logger user
$ssoUser
\sso\SsoUseruser in SSO database
$credentials
array<mixed,string>list of allowed applications for user : applicationPath => applicationHandlerClassName
Logout and remove SSO session
logout()
Initialize new session
__construct()
Exceptions
\sso\BusinessException |
if header already sent |
restore previous saved session
restorePreviousSession()
save previous session
savePreviousSession()
Properties
TRUE if the user is a SSO administrator
$SSO_ADMIN : boolean
| magic |
|
| property |
TRUE if the user is a SSO administrator |
list of credentials applications for current user
$SSO_CREDENTIALS : array<mixed,mixed>
| magic |
|
| property |
list of credentials applications for current user |
list of variables to register/define in application handlers
$SSO_GLOBALS : array<mixed,mixed>
| magic |
|
| property |
list of variables to register/define in application handlers |
true if user is logged via local auth mecanism, allow user to change their password
$SSO_LOCAL_AUTH : boolean
| magic |
|
| property |
true if user is logged via local auth mecanism, allow user to change their password |
user id
$SSO_LOGIN : string
the profil to use for the next page (preview theme feature)
$SSO_PROFIL_PREVIEW : \sso\SsoProfil
| magic |
|
| property |
the profil to use for the next page (preview theme feature) |
data (appli, url, etc...) for redirect after login
$SSO_REDIRECT : array<mixed,mixed>
| magic |
|
| property |
data (appli, url, etc...) for redirect after login |
the previous page to return if user access to SSO from another application
$SSO_RETURN_URL : string
| magic |
|
| property |
the previous page to return if user access to SSO from another application |
timeout of the session cookie
$SSO_TIMEOUT : integer
| magic |
|
| property |
timeout of the session cookie |
the full AuthEntry object that represent the user
$SSO_USER : \sso\AuthUser
| magic |
|
| property |
the full AuthEntry object that represent the user |
the user name
$SSO_USERNAME : string
| magic |
|
| property |
the user name |
TRUE if we have to check User Agent on each page
$SSO_checkAgent : boolean
| magic |
|
| property |
TRUE if we have to check User Agent on each page |
TRUE if we have to check IP on each page
$SSO_checkIP : boolean
| magic |
|
| property |
TRUE if we have to check IP on each page |
the last User Agent
$SSO_lastAgent : string
| magic |
|
| property |
the last User Agent |
the last IP address
$SSO_lastIP : string
| magic |
|
| property |
the last IP address |
last access time to the session
$SSO_lastTime : integer
| magic |
|
| property |
last access time to the session |
list of session attributes default values : session key => value
$SESSION_ATTRIBUTES
Default
array('session.gc_probability' => 1, 'session.gc_divisor' => 100, 'session.gc_maxlifetime' => 604800)
Static
SSO session data, key => value
$data : array<mixed,mixed>
instance
$instance : \sso\Session
Static
old session data, key => value
$old : array<mixed,mixed>
Constants
name of SSO Session
SSO_SESSION_NAME = 'SSO_SESSID'