simple-jwt icon indicating copy to clipboard operation
simple-jwt copied to clipboard

JWTManager使用了魔术变量,对hyperf的支持有问题。

Open ShaBaoFa opened this issue 1 year ago • 0 comments

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框架无法获取到参数的。

ShaBaoFa avatar Apr 09 '24 08:04 ShaBaoFa