We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
过期怎么刷新
The text was updated successfully, but these errors were encountered:
新建refresh接口 解析传递过来的token后判断exp过期时间 并验证用户 通过后调用fromUser方法重新生成token返回就可以了 如果不做refresh过期时间判断,直接:
$user = JWT::authenticate(); return ApiResponse::array([ 'token' => JWT::fromUser($user) ]);
Sorry, something went wrong.
然而 过期之后就无法获得用户信息。
$segments = explode('.', $token); list(, $payload64) = $segments; $payload = json_decode(\Zewail\Api\JWT\Library\UrlSafeBase64::decode($payload64), true, 512, JSON_BIGINT_AS_STRING);
@osindex token 包含了过期时间和用户信息等资料,是否过期需要自己判断,只要拿到了token就可以解析出用户名信息
token
@czewail 嗯 我的意思就是 用贴出的方法自行获取~
No branches or pull requests
过期怎么刷新
The text was updated successfully, but these errors were encountered: