public checkClaim ( Jose\Object\JWTInterface $jwt ) | ||
$jwt | Jose\Object\JWTInterface |
public function checkClaim(JWTInterface $jwt)
{
if (!$jwt->hasClaim('exp')) {
return [];
}
$exp = (int) $jwt->getClaim('exp');
Assertion::greaterThan($exp, time(), 'The JWT has expired.');
return ['exp'];
}