Jose\Object\JWTInterface::hasClaim PHP Méthode

hasClaim() public méthode

public hasClaim ( string $key ) : boolean
$key string The key
Résultat boolean
    public function hasClaim($key);

Usage Example

Exemple #1
0
 /**
  * {@inheritdoc}
  */
 public function checkClaim(JWTInterface $jwt)
 {
     if (!$jwt->hasClaim('iat')) {
         return [];
     }
     $iat = (int) $jwt->getClaim('iat');
     Assertion::lessOrEqualThan($iat, time(), 'The JWT is issued in the future.');
     return ['iat'];
 }
All Usage Examples Of Jose\Object\JWTInterface::hasClaim