|
@@ 169-171 (lines=3) @@
|
| 166 |
|
if (!isset($claims['prn']) || empty($claims['prn'])) { |
| 167 |
|
throw new \InvalidArgumentException("Missing principle claim"); |
| 168 |
|
} |
| 169 |
|
if (isset($claims['exp']) && $claims['exp'] < time()) { |
| 170 |
|
throw new \InvalidArgumentException("Token is expired by 'exp'"); |
| 171 |
|
} |
| 172 |
|
if (isset($claims['iat']) && $claims['iat'] < $this->minIssueTime) { |
| 173 |
|
throw new \InvalidArgumentException("Server deemed your token too old"); |
| 174 |
|
} |
|
@@ 172-174 (lines=3) @@
|
| 169 |
|
if (isset($claims['exp']) && $claims['exp'] < time()) { |
| 170 |
|
throw new \InvalidArgumentException("Token is expired by 'exp'"); |
| 171 |
|
} |
| 172 |
|
if (isset($claims['iat']) && $claims['iat'] < $this->minIssueTime) { |
| 173 |
|
throw new \InvalidArgumentException("Server deemed your token too old"); |
| 174 |
|
} |
| 175 |
|
if (isset($claims['nbf']) && $claims['nbf'] > time()) { |
| 176 |
|
throw new \InvalidArgumentException("Token not valid yet"); |
| 177 |
|
} |
|
@@ 175-177 (lines=3) @@
|
| 172 |
|
if (isset($claims['iat']) && $claims['iat'] < $this->minIssueTime) { |
| 173 |
|
throw new \InvalidArgumentException("Server deemed your token too old"); |
| 174 |
|
} |
| 175 |
|
if (isset($claims['nbf']) && $claims['nbf'] > time()) { |
| 176 |
|
throw new \InvalidArgumentException("Token not valid yet"); |
| 177 |
|
} |
| 178 |
|
if (isset($claims['iss']) && $claims['iss'] !== $this->issuer) { |
| 179 |
|
throw new \InvalidArgumentException("Issuer mismatch"); |
| 180 |
|
} |
|
@@ 178-180 (lines=3) @@
|
| 175 |
|
if (isset($claims['nbf']) && $claims['nbf'] > time()) { |
| 176 |
|
throw new \InvalidArgumentException("Token not valid yet"); |
| 177 |
|
} |
| 178 |
|
if (isset($claims['iss']) && $claims['iss'] !== $this->issuer) { |
| 179 |
|
throw new \InvalidArgumentException("Issuer mismatch"); |
| 180 |
|
} |
| 181 |
|
if (isset($claims['aud']) && $claims['aud'] !== $this->audience) { |
| 182 |
|
throw new \InvalidArgumentException("Audience mismatch"); |
| 183 |
|
} |
|
@@ 181-183 (lines=3) @@
|
| 178 |
|
if (isset($claims['iss']) && $claims['iss'] !== $this->issuer) { |
| 179 |
|
throw new \InvalidArgumentException("Issuer mismatch"); |
| 180 |
|
} |
| 181 |
|
if (isset($claims['aud']) && $claims['aud'] !== $this->audience) { |
| 182 |
|
throw new \InvalidArgumentException("Audience mismatch"); |
| 183 |
|
} |
| 184 |
|
} |
| 185 |
|
|
| 186 |
|
|