simple-jwt
simple-jwt copied to clipboard
JWTManager使用了魔术变量,对hyperf的支持有问题。
145-156行 public function initPayload(): array { $timestamp = time();
return [
'sub' => '1',
'iss' => 'http://' . ($_SERVER['SERVER_NAME'] ?? '') . ':' . ($_SERVER['SERVER_PORT'] ?? '') . ($_SERVER['REQUEST_URI'] ?? ''),
'exp' => $timestamp + $this->getTtl(),
'iat' => $timestamp,
'nbf' => $timestamp,
];
}
hyperf框架无法获取到参数的。