ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
SessionNotOnOrAfter.php
Go to the documentation of this file.
1 <?php
2 
4 
9 
10 class SessionNotOnOrAfter implements
12 {
13  public function validate(Assertion $assertion, Result $result)
14  {
15  $sessionNotOnOrAfterTimestamp = $assertion->getSessionNotOnOrAfter();
16  $currentTime = Temporal::getTime();
17  if ($sessionNotOnOrAfterTimestamp && $sessionNotOnOrAfterTimestamp <= $currentTime - 60) {
18  $result->addError(
19  'Received an assertion with a session that has expired. Check clock synchronization on IdP and SP.'
20  );
21  }
22  }
23 }
$result
static getTime()
Getter for getting the current timestamp.
Definition: Temporal.php:13
Simple Result object.
Definition: Result.php:10
getSessionNotOnOrAfter()
Retrieve the session expiration timestamp.
Definition: Assertion.php:997