/** * Ensure that a token is available in the request. * * @throws \Tymon\JWTAuth\Exceptions\JWTException * * @return \Tymon\JWTAuth\JWT */ protected function requireToken() { if (!$this->jwt->getToken()) { throw new JWTException('Token could not be parsed from the request.'); } return $this->jwt; }
/** * Get the token. * * @return false|Token */ public function getToken() { return $this->jwt->getToken(); }