ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
sspmod_core_Auth_Process_ExtendIdPSession Class Reference

Extend IdP session and cookies. More...

+ Inheritance diagram for sspmod_core_Auth_Process_ExtendIdPSession:
+ Collaboration diagram for sspmod_core_Auth_Process_ExtendIdPSession:

Public Member Functions

 process (&$state)
 
- Public Member Functions inherited from SimpleSAML_Auth_ProcessingFilter
 __construct (&$config, $reserved)
 Constructor for a processing filter. More...
 
 process (&$request)
 Process a request. More...
 

Additional Inherited Members

- Data Fields inherited from SimpleSAML_Auth_ProcessingFilter
 $priority = 50
 Priority of this filter. More...
 

Detailed Description

Extend IdP session and cookies.

Definition at line 6 of file ExtendIdPSession.php.

Member Function Documentation

◆ process()

sspmod_core_Auth_Process_ExtendIdPSession::process ( $state)

Definition at line 8 of file ExtendIdPSession.php.

References $globalConfig, $session, $state, SimpleSAML_Configuration\getInstance(), SimpleSAML_Session\getSessionFromRequest(), and SimpleSAML\SessionHandler\getSessionHandler().

8  {
9  assert(is_array($state));
10 
11  if (empty($state['Expire']) || empty($state['Authority'])) {
12  return;
13  }
14 
15  $now = time();
16  $delta = $state['Expire'] - $now;
17 
19  $sessionDuration = $globalConfig->getInteger('session.duration', 8*60*60);
20 
21  // Extend only if half of session duration already passed
22  if ($delta >= ($sessionDuration * 0.5)) {
23  return;
24  }
25 
26  // Update authority expire time
28  $session->setAuthorityExpire($state['Authority']);
29 
30  /* Update session cookies duration */
31 
32  /* If remember me is active */
33  $rememberMeExpire = $session->getRememberMeExpire();
34  if (!empty($state['RememberMe']) && $rememberMeExpire !== NULL && $globalConfig->getBoolean('session.rememberme.enable', FALSE)) {
35  $session->setRememberMeExpire();
36  return;
37  }
38 
39  /* Or if session lifetime is more than zero */
41  $cookieParams = $sessionHandler->getCookieParams();
42  if ($cookieParams['lifetime'] > 0) {
43  $session->updateSessionCookies();
44  }
45  }
$session
if(!array_key_exists('stateid', $_REQUEST)) $state
Handle linkback() response from LinkedIn.
Definition: linkback.php:10
static getSessionHandler()
This function retrieves the current instance of the session handler.
$globalConfig
static getSessionFromRequest()
Retrieves the current session.
Definition: Session.php:241
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.
+ Here is the call graph for this function:

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