/** * Get the timestamp when the blacklist comes into effect * This defaults to immediate (0 seconds) * * @return integer */ protected function getGraceTimestamp() { return (int) Utils::now()->addSeconds($this->gracePeriod)->format('U'); }
/** * Get the Not Before (nbf) claim. * * @return int */ public function nbf() { return Utils::now()->getTimestamp(); }
/** * Get the Not Before (nbf) claim * * @return int */ public function nbf() { return (int) Utils::now()->format('U'); }
/** * Check the token in the refresh flow context * * @param $payload * * @throws \Tymon\JWTAuth\Exceptions\TokenExpiredException * * @return bool */ protected function validateRefresh(array $payload) { if (isset($payload['iat']) && Utils::timestamp($payload['iat'])->diffInMinutes(Utils::now()) >= $this->refreshTTL) { throw new TokenExpiredException('Token has expired and can no longer be refreshed'); } return true; }
/** * Get the timestamp when the blacklist comes into effect * This defaults to immediate (0 seconds). * * @return int */ protected function getGraceTimestamp() { return Utils::now()->addSeconds($this->gracePeriod)->getTimestamp(); }