Skip to content

Commit ac27dbf

Browse files
committed
fix(control): 修改密码需要验证权限
1 parent 9606433 commit ac27dbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

laravel/app/Http/Controllers/Api/UserController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function __construct()
2222
// 这样的结果是,token 只能在有效期以内进行刷新,过期无法刷新
2323
// 如果把 refresh 也放进去,token 即使过期但仍在刷新期以内也可刷新
2424
// 不过刷新一次作废
25-
$this->middleware('auth:api', ['except' => ['password']]);
25+
$this->middleware('auth:api', ['except' => ['login']]);
2626
// 另外关于上面的中间件,官方文档写的是『auth:api』
2727
// 但是我推荐用 『jwt.auth』,效果是一样的,但是有更加丰富的报错信息返回
2828
}

0 commit comments

Comments
 (0)