ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
SimpleSAML\SessionHandler Class Reference
+ Inheritance diagram for SimpleSAML\SessionHandler:
+ Collaboration diagram for SimpleSAML\SessionHandler:

Public Member Functions

 newSessionId ()
 Create a new session id. More...
 
 getCookieSessionId ()
 Retrieve the session ID saved in the session cookie, if there's one. More...
 
 getSessionCookieName ()
 Retrieve the session cookie name. More...
 
 saveSession (\SimpleSAML_Session $session)
 Save the session. More...
 
 loadSession ($sessionId=null)
 Load the session. More...
 
 hasSessionCookie ()
 Check whether the session cookie is set. More...
 
 setCookie ($sessionName, $sessionID, array $cookieParams=null)
 Set a session cookie. More...
 
 getCookieParams ()
 Get the cookie parameters that should be used for session cookies. More...
 

Static Public Member Functions

static getSessionHandler ()
 This function retrieves the current instance of the session handler. More...
 

Protected Member Functions

 __construct ()
 This constructor is included in case it is needed in the future. More...
 

Static Protected Attributes

static $sessionHandler = null
 

Detailed Description

Definition at line 17 of file SessionHandler.php.

Constructor & Destructor Documentation

◆ __construct()

SimpleSAML\SessionHandler::__construct ( )
protected

This constructor is included in case it is needed in the future.

Including it now allows us to write parent::__construct() in the subclasses of this class.

Definition at line 53 of file SessionHandler.php.

References $session, $sessionID, $store, and SimpleSAML\Store\getInstance().

54  {
55  }
+ Here is the call graph for this function:

Member Function Documentation

◆ getCookieParams()

SimpleSAML\SessionHandler::getCookieParams ( )

Get the cookie parameters that should be used for session cookies.

Returns
array An array with the cookie parameters. http://www.php.net/manual/en/function.session-get-cookie-params.php

Definition at line 148 of file SessionHandler.php.

References $config, and SimpleSAML_Configuration\getInstance().

149  {
151 
152  return array(
153  'lifetime' => $config->getInteger('session.cookie.lifetime', 0),
154  'path' => $config->getString('session.cookie.path', '/'),
155  'domain' => $config->getString('session.cookie.domain', null),
156  'secure' => $config->getBoolean('session.cookie.secure', false),
157  'httponly' => true,
158  );
159  }
$config
Definition: bootstrap.php:15
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.
+ Here is the call graph for this function:

◆ getCookieSessionId()

SimpleSAML\SessionHandler::getCookieSessionId ( )
abstract

Retrieve the session ID saved in the session cookie, if there's one.

Returns
string|null The session id saved in the cookie or null if no session cookie was set.

◆ getSessionCookieName()

SimpleSAML\SessionHandler::getSessionCookieName ( )
abstract

Retrieve the session cookie name.

Returns
string The session cookie name.

◆ getSessionHandler()

static SimpleSAML\SessionHandler::getSessionHandler ( )
static

This function retrieves the current instance of the session handler.

The session handler will be instantiated if this is the first call to this function.

Returns
The current session handler.

Definition at line 38 of file SessionHandler.php.

Referenced by SimpleSAML_Session\__construct(), SimpleSAML_Session\cleanup(), SimpleSAML_Session\doLogin(), SimpleSAML_Session\getSession(), SimpleSAML_Session\hasSessionCookie(), sspmod_core_Auth_Process_ExtendIdPSession\process(), SimpleSAML_Session\save(), and SimpleSAML_Session\updateSessionCookies().

39  {
40  if (self::$sessionHandler === null) {
41  self::createSessionHandler();
42  }
43 
44  return self::$sessionHandler;
45  }
+ Here is the caller graph for this function:

◆ hasSessionCookie()

SimpleSAML\SessionHandler::hasSessionCookie ( )
abstract

Check whether the session cookie is set.

This function will only return false if is is certain that the cookie isn't set.

Returns
bool True if it was set, false if not.

◆ loadSession()

SimpleSAML\SessionHandler::loadSession (   $sessionId = null)
abstract

Load the session.

Parameters
string | null$sessionIdThe ID of the session we should load, or null to use the default.
Returns
|null The session object, or null if it doesn't exist.

◆ newSessionId()

SimpleSAML\SessionHandler::newSessionId ( )
abstract

Create a new session id.

Returns
string The new session id.

◆ saveSession()

SimpleSAML\SessionHandler::saveSession ( \SimpleSAML_Session  $session)
abstract

Save the session.

Parameters
\SimpleSAML_Session$sessionThe session object we should save.

◆ setCookie()

SimpleSAML\SessionHandler::setCookie (   $sessionName,
  $sessionID,
array  $cookieParams = null 
)
abstract

Set a session cookie.

Parameters
string$sessionNameThe name of the session.
string | null$sessionIDThe session ID to use. Set to null to delete the cookie.
array | null$cookieParamsAdditional parameters to use for the session cookie.
Exceptions

Field Documentation

◆ $sessionHandler

SimpleSAML\SessionHandler::$sessionHandler = null
staticprotected

Definition at line 28 of file SessionHandler.php.


The documentation for this class was generated from the following file: