This commit is contained in:
2021-03-19 19:00:54 +08:00
parent d10a7c2d39
commit 6a52db4cfc
2 changed files with 9 additions and 2 deletions
-1
View File
@@ -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;
+9 -1
View File
@@ -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);
}