@@ 173-175 (lines=3) @@ | ||
170 | if ((!isset($claims['sub']) || empty($claims['sub'])) && (!isset($claims['prn']) || empty($claims['prn']))) { |
|
171 | throw new MissingClaimsException("Missing principle subject claim"); |
|
172 | } |
|
173 | if (isset($claims['exp']) && $claims['exp'] + $this->issuerTimeLeeway < time()) { |
|
174 | throw new InvalidTimeException("Token is expired by 'exp'"); |
|
175 | } |
|
176 | if (isset($claims['iat']) && $claims['iat'] < ($this->minIssueTime + $this->issuerTimeLeeway)) { |
|
177 | throw new InvalidTimeException("Server deemed your token too old"); |
|
178 | } |
|
@@ 176-178 (lines=3) @@ | ||
173 | if (isset($claims['exp']) && $claims['exp'] + $this->issuerTimeLeeway < time()) { |
|
174 | throw new InvalidTimeException("Token is expired by 'exp'"); |
|
175 | } |
|
176 | if (isset($claims['iat']) && $claims['iat'] < ($this->minIssueTime + $this->issuerTimeLeeway)) { |
|
177 | throw new InvalidTimeException("Server deemed your token too old"); |
|
178 | } |
|
179 | if (isset($claims['nbf']) && ($claims['nbf'] - $this->issuerTimeLeeway) > time()) { |
|
180 | throw new InvalidTimeException("Token not valid yet"); |
|
181 | } |
|
@@ 179-181 (lines=3) @@ | ||
176 | if (isset($claims['iat']) && $claims['iat'] < ($this->minIssueTime + $this->issuerTimeLeeway)) { |
|
177 | throw new InvalidTimeException("Server deemed your token too old"); |
|
178 | } |
|
179 | if (isset($claims['nbf']) && ($claims['nbf'] - $this->issuerTimeLeeway) > time()) { |
|
180 | throw new InvalidTimeException("Token not valid yet"); |
|
181 | } |
|
182 | if (isset($claims['iss']) && $claims['iss'] !== $this->issuer) { |
|
183 | throw new KeyTokenMismatchException("Issuer mismatch"); |
|
184 | } |