| Conditions | 3 |
| Paths | 3 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | 14 | public function checkClaim($value): void |
|
| 32 | { |
||
| 33 | 14 | if (! is_int($value)) { |
|
| 34 | 1 | throw new InvalidClaimException('"auth_time" must be an integer.', self::CLAIM_NAME, $value); |
|
| 35 | } |
||
| 36 | |||
| 37 | 13 | if ($value + $this->maxAge < time() - $this->allowedTimeDrift) { |
|
| 38 | 1 | throw new InvalidClaimException('Too much time has elapsed since the last End-User authentication.', self::CLAIM_NAME, $value); |
|
| 39 | } |
||
| 47 |