修改过期token返回码
This commit is contained in:
parent
5057f3eb9e
commit
2361be7d71
@ -17,7 +17,7 @@ class AuthTokenMiddleware extends Middleware
|
|||||||
JWTAuth::auth();
|
JWTAuth::auth();
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
if ($e instanceof TokenExpiredException) {
|
if ($e instanceof TokenExpiredException) {
|
||||||
throw new FailedException('token 过期', Code::LOST_LOGIN);
|
throw new FailedException('token 过期', Code::LOGIN_EXPIRED);
|
||||||
}
|
}
|
||||||
if ($e instanceof TokenBlacklistException) {
|
if ($e instanceof TokenBlacklistException) {
|
||||||
throw new FailedException('token 被加入黑名单', Code::LOST_LOGIN);
|
throw new FailedException('token 被加入黑名单', Code::LOST_LOGIN);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user