首先说一下版本
"laravel/framework": "5.4.*",
"tymon/jwt-auth": "0.5.*",
刷新token的代码如下
$api->group(['middleware' => 'jwt.auth'], function ($api) {
$api->get('refresh', [
'middleware' => 'jwt.refresh',
function() {
return response()->json([
'message' => 'By accessing this endpoint, you can refresh your access token at each request. Check out this response headers!',
'user' => user()
]);
}
]);
ssl=1,
refresh_ssl=2
当访问refresh接口的时间>1分钟的时候返回
{
"error": "token_expired"
}
不是应该可以刷新token的吗?token带在返回的headers里面,求大大们解答。