Conditions | 4 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
32 | public function validate(Assertion $assertion, Result $result): void |
||
33 | { |
||
34 | $conditions = $assertion->getConditions(); |
||
35 | if ($conditions !== null) { |
||
36 | $notBeforeTimestamp = $conditions->getNotBefore(); |
||
37 | $currentTime = self::$clock->now(); |
||
38 | if ( |
||
39 | ($notBeforeTimestamp !== null) && |
||
40 | ($notBeforeTimestamp > ($currentTime->add(new DateInterval('PT60S')))) |
||
41 | ) { |
||
42 | $result->addError( |
||
43 | 'Received an assertion that is valid in the future. Check clock synchronization on IdP and SP.', |
||
44 | ); |
||
49 |