xielin 6 年之前
父节点
当前提交
39e3e34dac
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/Http/Middleware/JwtAuthMiddleware.php

+ 1 - 1
app/Http/Middleware/JwtAuthMiddleware.php

@@ -30,7 +30,7 @@ class JwtAuthMiddleware
                 ];
                 return response()->json($error);
             }
-            $data = JWTAuth::decode($token);
+            $data = JWTAuth::decode($token)['user'];
             if ($data->sign !== md5($data->uid . env('JWT_SECRET'))) {
                 $error = [
                     'message' => 'request is not allow',