This commit is contained in:
szdot 2024-06-05 13:26:22 +08:00
commit 0855fec604
2 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@ class PublicController extends Controller
$data = [
'iat' => $currtime, // 签发时间(时间戳)
'iss' => 'jwt_admin', // 签发者
'nbf' => $currtime + 2, // 在此时间之前不可用 (这里是2秒以内)
'nbf' => $currtime, // 在此时间之前不可用 (这里是2秒以内)
'exp' => strtotime('tomorrow'), //过期时间 到第二天凌晨
'openid' => $openid,
'session_key' => $session_key,

View File

@ -76,7 +76,7 @@ class LoginController extends Controller
$data = [
'iat' => $currtime, // 签发时间(时间戳)
'iss' => 'jwt_admin', // 签发者
'nbf' => $currtime + 2, // 在此时间之前不可用 (这里是2秒以内)
'nbf' => $currtime, // 在此时间之前不可用 (这里是2秒以内)
'exp' => strtotime('tomorrow'), //过期时间 到第二天凌晨
'jti' => md5(uniqid('JWT') . $currtime),
'sub' => 'http://localhost:8080',