Session class

package sso\lib

 Methods

Retrieve a session variable

__get(string $var) : mixed

Parameters

$var

string

variable name

Returns

mixedvalue

Test if variable exists

__isset(string $var) : boolean

Parameters

$var

string

variable name

Returns

booleanTRUE if variable exists in session, FALSE otherwise

Set a variable in session

__set(string $var, mixed $value) 

Parameters

$var

string

variable name

$value

mixed

variable value

Remove a variable from session

__unset(string $var) 

Parameters

$var

string

variable name

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

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

Default

magic
property TRUE if the user is a SSO administrator
 

list of credentials applications for current user

$SSO_CREDENTIALS : array<mixed,mixed>

Default

magic
property list of credentials applications for current user
 

list of variables to register/define in application handlers

$SSO_GLOBALS : array<mixed,mixed>

Default

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

Default

magic
property true if user is logged via local auth mecanism, allow user to change their password
   

the profil to use for the next page (preview theme feature)

$SSO_PROFIL_PREVIEW : \sso\SsoProfil

Default

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>

Default

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

Default

magic
property the previous page to return if user access to SSO from another application
 

timeout of the session cookie

$SSO_TIMEOUT : integer

Default

magic
property timeout of the session cookie
 

the full AuthEntry object that represent the user

$SSO_USER : \sso\AuthUser

Default

magic
property the full AuthEntry object that represent the user
 

the user name

$SSO_USERNAME : string

Default

magic
property the user name
 

TRUE if we have to check User Agent on each page

$SSO_checkAgent : boolean

Default

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

Default

magic
property TRUE if we have to check IP on each page
 

the last User Agent

$SSO_lastAgent : string

Default

magic
property the last User Agent
 

the last IP address

$SSO_lastIP : string

Default

magic
property the last IP address
 

last access time to the session

$SSO_lastTime : integer

Default

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>

Default

array()
 

instance

$instance : \sso\Session

Default

NULL
Static
 

old session data, key => value

$old : array<mixed,mixed>

Default

array()

 Constants

 

name of SSO Session

SSO_SESSION_NAME = 'SSO_SESSID'