We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c7be9bb commit 0b9faeeCopy full SHA for 0b9faee
1 file changed
src/Middleware/Jwt.php
@@ -23,18 +23,18 @@ public function __construct(App $app)
23
public function handle($request, \Closure $next, $store = null)
24
{
25
if ($request->method(true) == 'OPTIONS') {
26
- return Response::create()->code(204)->header($header);
+ return Response::create()->code(204);
27
}
28
29
if (true === $this->app->get('jwt')->store($store)->verify()) {
30
31
- if ($this->app->get('jwt.user')->bind()) {
+ if ($this->app->get('jwt.user')->getBind()) {
32
if ($user = $this->app->get('jwt.user')->find()) {
33
// 路由注入
34
$request->user = $user;
35
36
// 绑定当前用户模型
37
- $class = $user->getClass();
+ $class = $this->app->get('jwt.user')->getClass();
38
$this->app->bind($class, $user);
39
40
// 绑定用户后一些业务处理
0 commit comments