Update v1.0.6.5
This commit is contained in:
@@ -1,20 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of jwt-auth.
|
||||
*
|
||||
* (c) Sean Tymon <tymon148@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Tymon\JWTAuth\Middleware;
|
||||
|
||||
use Tymon\JWTAuth\JWTAuth;
|
||||
use Illuminate\Events\Dispatcher;
|
||||
use Illuminate\Routing\ResponseFactory;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
use Illuminate\Contracts\Routing\ResponseFactory;
|
||||
|
||||
abstract class BaseMiddleware
|
||||
{
|
||||
/**
|
||||
* @var \Illuminate\Routing\ResponseFactory
|
||||
* @var \Illuminate\Contracts\Routing\ResponseFactory
|
||||
*/
|
||||
protected $response;
|
||||
|
||||
/**
|
||||
* @var \Illuminate\Events\Dispatcher
|
||||
* @var \Illuminate\Contracts\Events\Dispatcher
|
||||
*/
|
||||
protected $events;
|
||||
|
||||
@@ -24,10 +33,10 @@ abstract class BaseMiddleware
|
||||
protected $auth;
|
||||
|
||||
/**
|
||||
* Create a new BaseMiddleware instance
|
||||
* Create a new BaseMiddleware instance.
|
||||
*
|
||||
* @param \Illuminate\Routing\ResponseFactory $response
|
||||
* @param \Illuminate\Events\Dispatcher $events
|
||||
* @param \Illuminate\Contracts\Routing\ResponseFactory $response
|
||||
* @param \Illuminate\Contracts\Events\Dispatcher $events
|
||||
* @param \Tymon\JWTAuth\JWTAuth $auth
|
||||
*/
|
||||
public function __construct(ResponseFactory $response, Dispatcher $events, JWTAuth $auth)
|
||||
@@ -38,11 +47,11 @@ abstract class BaseMiddleware
|
||||
}
|
||||
|
||||
/**
|
||||
* Fire event and return the response
|
||||
* Fire event and return the response.
|
||||
*
|
||||
* @param string $event
|
||||
* @param string $error
|
||||
* @param integer $status
|
||||
* @param int $status
|
||||
* @param array $payload
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of jwt-auth.
|
||||
*
|
||||
* (c) Sean Tymon <tymon148@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Tymon\JWTAuth\Middleware;
|
||||
|
||||
use Tymon\JWTAuth\Exceptions\JWTException;
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of jwt-auth.
|
||||
*
|
||||
* (c) Sean Tymon <tymon148@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Tymon\JWTAuth\Middleware;
|
||||
|
||||
use Tymon\JWTAuth\Exceptions\JWTException;
|
||||
@@ -27,7 +36,7 @@ class RefreshToken extends BaseMiddleware
|
||||
}
|
||||
|
||||
// send the refreshed token back to the client
|
||||
$response->headers->set('Authorization', 'Bearer ' . $newToken);
|
||||
$response->headers->set('Authorization', 'Bearer '.$newToken);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user