Conditions | 3 |
Paths | 2 |
Total Lines | 7 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
32 | public function validate(Assertion $assertion, Result $result): void |
||
33 | { |
||
34 | $sessionNotOnOrAfterTimestamp = $assertion->getAuthnStatements()[0]->getSessionNotOnOrAfter(); |
||
35 | $currentTime = self::$clock->now(); |
||
36 | if (($sessionNotOnOrAfterTimestamp !== null) && ($sessionNotOnOrAfterTimestamp <= ($currentTime->sub(new DateInterval('PT60S'))))) { |
||
37 | $result->addError( |
||
38 | 'Received an assertion with a session that has expired. Check clock synchronization on IdP and SP.', |
||
39 | ); |
||
43 |