| Conditions | 4 |
| Paths | 3 |
| Total Lines | 9 |
| Code Lines | 7 |
| 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 (($notBeforeTimestamp !== null) && ($notBeforeTimestamp > ($currentTime->add(new DateInterval('PT60S'))))) { |
||
| 39 | $result->addError( |
||
| 40 | 'Received an assertion that is valid in the future. Check clock synchronization on IdP and SP.', |
||
| 41 | ); |
||
| 46 |