コード例 #1
0
ファイル: Blacklist.php プロジェクト: earnaway/jwt-auth
 /**
  * Determine whether the token has been blacklisted.
  *
  * @param  \Tymon\JWTAuth\Payload  $payload
  * @return bool
  */
 public function has(Payload $payload)
 {
     $grace = $this->storage->get($payload['jti']);
     // check whether the expiry + grace has past
     if (is_null($grace) || Utils::timestamp($grace['valid_until'])->isFuture()) {
         return false;
     }
     return true;
 }