diff --git a/HttpServer/Route/Router.php b/HttpServer/Route/Router.php index e0db3641..1ea9f6e4 100644 --- a/HttpServer/Route/Router.php +++ b/HttpServer/Route/Router.php @@ -10,7 +10,6 @@ use HttpServer\Http\Request; use HttpServer\IInterface\RouterInterface; use JetBrains\PhpStorm\Pure; -use ReflectionException; use Snowflake\Abstracts\Config; use Snowflake\Core\Json; use Snowflake\Exception\ComponentException; diff --git a/System/Jwt/Jwt.php b/System/Jwt/Jwt.php index cd98b901..f13cecbd 100644 --- a/System/Jwt/Jwt.php +++ b/System/Jwt/Jwt.php @@ -458,10 +458,18 @@ mlAZUEjsoaT9vjvjGTxl3uCm0TX5KTgtSJIt2kA1tYVjQef+/iZTHxY= } /** + * @param null $token + * @param null $source * @throws Exception */ - private function expireRefresh() + public function expireRefresh($token = null, $source = null) { + if (!empty($token)) { + $this->data['token'] = $token; + } + if (!empty($source)) { + $this->data['source'] = $source; + } $key = $this->authKey($this->getSource(), $this->data['token']); $this->getRedis()->expire($key, $this->timeout); }