/** * {@inheritdoc} */ public function validate(Token $token) { if (null === $token->notBefore()) { throw new MissingClaim(Token::CLAIM_NBF, $token); } if (false === $token->isAcceptable($this->currentTime)) { throw new UnacceptableToken($token); } }
/** * {@inheritdoc} */ public function validate(Token $token) { if (null === $token->expiresAt()) { throw new MissingClaim(Token::CLAIM_EXP, $token); } if ($token->isExpired($this->currentTime)) { throw new ExpiredToken($token); } }
/** * {@inheritdoc} */ public function validate(Token $token) { if (null === $token->get($this->claim)) { throw new MissingClaim($this->claim, $token); } }