Ejemplo n.º 1
0
 /** @test */
 public function it_should_return_false_if_no_token_in_request()
 {
     $request = Request::create('foo', 'GET', ['foo' => 'bar']);
     $parser = new TokenParser($request);
     $this->assertFalse($parser->parseToken());
     $this->assertFalse($parser->hasToken());
 }
Ejemplo n.º 2
0
 /**
  * Set the request instance.
  *
  * @param \Illuminate\Http\Request $request
  *
  * @return JWTAuth
  */
 public function setRequest(Request $request)
 {
     $this->parser->setRequest($request);
     return $this;
 }