Jose\Object\JWTInterface::hasClaim PHP 메소드

hasClaim() 공개 메소드

public hasClaim ( string $key ) : boolean
$key string The key
리턴 boolean
    public function hasClaim($key);

Usage Example

예제 #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