Beispiel #1
0
 /**
  * Add the token (jti claim) to the blacklist
  *
  * @param  \Tymon\JWTAuth\Payload  $payload
  *
  * @return boolean
  */
 public function add(Payload $payload)
 {
     // if there is no exp claim then add the jwt to
     // the blacklist indefinitely
     if (!$payload->hasKey('exp')) {
         return $this->addForever($payload);
     }
     $this->storage->add($this->getKey($payload), ['valid_until' => $this->getGraceTimestamp()], $this->getMinutesUntilExpired($payload));
     return true;
 }