| Conditions | 3 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function validate(Assertion $assertion, Result $result): void |
||
| 20 | { |
||
| 21 | $notBefore = $assertion->getConditions()?->getNotBefore()?->toDateTime(); |
||
| 22 | $clock = Utils::getContainer()->getClock(); |
||
| 23 | |||
| 24 | if (($notBefore !== null) && ($notBefore > ($clock->now()->add(new DateInterval('PT60S'))))) { |
||
| 25 | $result->addError( |
||
| 26 | 'Received an assertion that is valid in the future. Check clock synchronization on IdP and SP.', |
||
| 27 | ); |
||
| 31 |