コード例 #1
0
ファイル: JWTGuard.php プロジェクト: a161527/cs319-p2t5
 /**
  * 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;
 }
コード例 #2
0
 /**
  * Get the token.
  *
  * @return false|Token
  */
 public function getToken()
 {
     return $this->jwt->getToken();
 }