ILIAS
Release_4_1_x_branch Revision 61804
|
Static Public Member Functions | |
static | checkExpiredSession () |
checks for possibly expired session should be called from ilAuthUtils::__initAuth() so it's called before session_start() is called | |
static | initSession () |
mark session with type regarding to the context. | |
static | handleLoginEvent ($a_login, $a_auth) |
when current session is allowed to be created it marks it with type regarding to the sessions user context. | |
static | handleLogoutEvent () |
reset sessions type to unknown | |
static | getSettingFields () |
returns the array of setting fields |
Data Fields | |
const | INTERNAL_DEBUG = false |
this controls the debuggin into a separate logfile (. | |
const | DEFAULT_MAX_COUNT = 0 |
default value for settings that have not been defined in setup or administration yet | |
const | DEFAULT_MIN_IDLE = 15 |
const | DEFAULT_MAX_IDLE = 30 |
const | DEFAULT_MAX_IDLE_AFTER_FIRST_REQUEST = 1 |
const | DEFAULT_ALLOW_CLIENT_MAINTENANCE = 1 |
const | SESSION_TYPE_UNKNOWN = 0 |
session types from which one is assigned to each session | |
const | SESSION_TYPE_SYSTEM = 1 |
const | SESSION_TYPE_ADMIN = 2 |
const | SESSION_TYPE_USER = 3 |
const | SESSION_TYPE_ANONYM = 4 |
Static Private Member Functions | |
static | checkCurrentSessionIsAllowed (Auth $a_auth) |
checks wether the current session exhaust the limit of sessions when limit is reached it deletes "firstRequestAbidencer" and checks again when limit is still reached it deletes "oneMinIdleSession" and checks again when limit is still reached the current session will be logged out | |
static | getExistingSessionCount (array $a_types) |
returns number of valid sessions relating to given session types | |
static | kickOneMinIdleSession (array $a_types) |
if sessions exist that relates to given session types and idled longer than min idle parameter, this method deletes one of these sessions | |
static | kickFirstRequestAbidencer (array $a_types) |
kicks sessions of users that abidence after login so people could not login and go for coffe break ;-) | |
static | isValidSession ($a_sid) |
checks if session exists for given id and if it is still valid | |
static | removeSessionCookie () |
removes a session cookie, so it is not sent by browser anymore | |
static | checkAdministrationPermission ($a_user_id) |
checks wether a given user login relates to an user with administrative permissions | |
static | debug ($a_debug_log_message) |
logs the given debug message in ilLog |
Static Private Attributes | |
static | $setting_fields |
all fieldnames that are saved in settings table | |
static | $session_types_controlled |
static | $session_types_not_controlled |
all session types that will be involved when count of sessions will be determined or when idleing sessions will be destroyed |
Definition at line 11 of file class.ilSessionControl.php.
|
staticprivate |
checks wether a given user login relates to an user with administrative permissions
ilRbacSystem $rbacsystem
integer | $a_user_id |
Definition at line 456 of file class.ilSessionControl.php.
Referenced by handleLoginEvent().
|
staticprivate |
checks wether the current session exhaust the limit of sessions when limit is reached it deletes "firstRequestAbidencer" and checks again when limit is still reached it deletes "oneMinIdleSession" and checks again when limit is still reached the current session will be logged out
ilSetting $ilSetting ilAppEventHandler $ilAppEventHandler
Auth | $a_auth |
Definition at line 229 of file class.ilSessionControl.php.
References $ilSetting, debug(), DEFAULT_MAX_COUNT, getExistingSessionCount(), kickFirstRequestAbidencer(), kickOneMinIdleSession(), Auth\logout(), and ilUtil\redirect().
Referenced by handleLoginEvent().
|
static |
checks for possibly expired session should be called from ilAuthUtils::__initAuth() so it's called before session_start() is called
ilSetting $ilSetting ilLanguage $lng ilAppEventHandler $ilAppEventHandler
Definition at line 84 of file class.ilSessionControl.php.
References $_COOKIE, $_GET, $ilSetting, $lng, debug(), isValidSession(), ilUtil\redirect(), and removeSessionCookie().
Referenced by ilAuthUtils\_initAuth().
|
staticprivate |
logs the given debug message in ilLog
ilLog $ilLog
string | $a_debug_log_message |
Definition at line 475 of file class.ilSessionControl.php.
References $ilLog.
Referenced by checkCurrentSessionIsAllowed(), checkExpiredSession(), handleLoginEvent(), handleLogoutEvent(), initSession(), isValidSession(), kickFirstRequestAbidencer(), kickOneMinIdleSession(), and removeSessionCookie().
|
staticprivate |
returns number of valid sessions relating to given session types
ilDB $ilDB
array | $a_types |
Definition at line 302 of file class.ilSessionControl.php.
References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.
Referenced by checkCurrentSessionIsAllowed().
|
static |
returns the array of setting fields
Definition at line 489 of file class.ilSessionControl.php.
References $setting_fields.
Referenced by ilSetup\checkClientSessionSettings(), ilSetupGUI\displaySessions(), ilSetup\getSessionSettings(), and ilSetup\setSessionSettings().
|
static |
when current session is allowed to be created it marks it with type regarding to the sessions user context.
when session is not allowed to be created it will be destroyed.
Definition at line 161 of file class.ilSessionControl.php.
References $_SESSION, $ilSetting, ilObjUser\_lookupId(), checkAdministrationPermission(), checkCurrentSessionIsAllowed(), debug(), SESSION_TYPE_ADMIN, SESSION_TYPE_ANONYM, SESSION_TYPE_SYSTEM, and SESSION_TYPE_USER.
Referenced by ilAuthBase\loginObserver().
|
static |
reset sessions type to unknown
Definition at line 205 of file class.ilSessionControl.php.
References $_SESSION, $ilSetting, debug(), removeSessionCookie(), and SESSION_TYPE_UNKNOWN.
Referenced by ilAuthBase\logoutObserver().
|
static |
mark session with type regarding to the context.
should be called from ilAuthBase::initAuth()
Definition at line 137 of file class.ilSessionControl.php.
References $_SESSION, $ilSetting, debug(), and SESSION_TYPE_UNKNOWN.
Referenced by ilAuthBase\initAuth().
|
staticprivate |
checks if session exists for given id and if it is still valid
ilDB $ilDB ilSetting $ilSetting
string | $a_sid |
Definition at line 397 of file class.ilSessionControl.php.
References $ilDB, $ilSetting, $query, $res, $row, and debug().
|
staticprivate |
kicks sessions of users that abidence after login so people could not login and go for coffe break ;-)
ilDB $ilDB ilSetting $ilSetting
Definition at line 367 of file class.ilSessionControl.php.
References $ilDB, $ilSetting, $query, and debug().
Referenced by checkCurrentSessionIsAllowed().
|
staticprivate |
if sessions exist that relates to given session types and idled longer than min idle parameter, this method deletes one of these sessions
ilDB $ilDB ilSetting $ilSetting
array | $a_types |
Definition at line 327 of file class.ilSessionControl.php.
References $ilDB, $ilSetting, $query, $res, $row, ilSession\_destroy(), DB_FETCHMODE_OBJECT, and debug().
Referenced by checkCurrentSessionIsAllowed().
|
staticprivate |
removes a session cookie, so it is not sent by browser anymore
Definition at line 442 of file class.ilSessionControl.php.
References debug(), and ilUtil\setCookie().
Referenced by checkExpiredSession(), and handleLogoutEvent().
|
staticprivate |
Definition at line 58 of file class.ilSessionControl.php.
|
staticprivate |
all session types that will be involved when count of sessions will be determined or when idleing sessions will be destroyed
all session types that will be ignored when count of sessions will be determined or when idleing sessions will be destroyed
Definition at line 69 of file class.ilSessionControl.php.
|
staticprivate |
all fieldnames that are saved in settings table
Definition at line 34 of file class.ilSessionControl.php.
Referenced by getSettingFields().
const ilSessionControl::DEFAULT_ALLOW_CLIENT_MAINTENANCE = 1 |
Definition at line 27 of file class.ilSessionControl.php.
Referenced by ilSetup\getSessionSettings(), ilObjSystemFolderGUI\initBasicSettingsForm(), and ilObjSystemFolderGUI\saveBasicSettingsObject().
const ilSessionControl::DEFAULT_MAX_COUNT = 0 |
default value for settings that have not been defined in setup or administration yet
Definition at line 23 of file class.ilSessionControl.php.
Referenced by checkCurrentSessionIsAllowed(), ilSetup\getSessionSettings(), and ilObjSystemFolderGUI\initBasicSettingsForm().
const ilSessionControl::DEFAULT_MAX_IDLE = 30 |
Definition at line 25 of file class.ilSessionControl.php.
Referenced by ilSession\_writeData(), ilSetup\getSessionSettings(), and ilObjSystemFolderGUI\initBasicSettingsForm().
const ilSessionControl::DEFAULT_MAX_IDLE_AFTER_FIRST_REQUEST = 1 |
Definition at line 26 of file class.ilSessionControl.php.
Referenced by ilSetup\getSessionSettings(), and ilObjSystemFolderGUI\initBasicSettingsForm().
const ilSessionControl::DEFAULT_MIN_IDLE = 15 |
Definition at line 24 of file class.ilSessionControl.php.
Referenced by ilSetup\getSessionSettings(), and ilObjSystemFolderGUI\initBasicSettingsForm().
const ilSessionControl::INTERNAL_DEBUG = false |
this controls the debuggin into a separate logfile (.
/session.log)
Definition at line 17 of file class.ilSessionControl.php.
const ilSessionControl::SESSION_TYPE_ADMIN = 2 |
Definition at line 48 of file class.ilSessionControl.php.
Referenced by handleLoginEvent().
const ilSessionControl::SESSION_TYPE_ANONYM = 4 |
Definition at line 50 of file class.ilSessionControl.php.
Referenced by handleLoginEvent().
const ilSessionControl::SESSION_TYPE_SYSTEM = 1 |
Definition at line 47 of file class.ilSessionControl.php.
Referenced by handleLoginEvent().
const ilSessionControl::SESSION_TYPE_UNKNOWN = 0 |
session types from which one is assigned to each session
Definition at line 46 of file class.ilSessionControl.php.
Referenced by handleLogoutEvent(), and initSession().
const ilSessionControl::SESSION_TYPE_USER = 3 |
Definition at line 49 of file class.ilSessionControl.php.
Referenced by handleLoginEvent().