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