Ejemplo n.º 1
0
 /**
  * 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;
 }
Ejemplo n.º 2
0
 /**
  * @param \Tymon\JWTAuth\Manager                   $manager
  * @param \Tymon\JWTAuth\Contracts\Providers\Auth  $auth
  * @param \Tymon\JWTAuth\Http\Parser               $parser
  */
 public function __construct(Manager $manager, Auth $auth, Parser $parser)
 {
     parent::__construct($manager, $parser);
     $this->auth = $auth;
 }
Ejemplo n.º 3
0
 /**
  * Get the raw Payload instance.
  *
  * @return \Tymon\JWTAuth\Payload
  */
 public function getPayload()
 {
     return $this->jwt->getPayload();
 }