ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
SessionNotOnOrAfter.php
Go to the documentation of this file.
1<?php
2
4
9
10class 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
An exception for terminatinating execution or to throw for unit testing.
Simple Result object.
Definition: Result.php:11
getSessionNotOnOrAfter()
Retrieve the session expiration timestamp.
Definition: Assertion.php:997
static getTime()
Getter for getting the current timestamp.
Definition: Temporal.php:13