diff --git a/app/api/service/JwtTokenService.php b/app/api/service/JwtTokenService.php index ac942901..2f29dbdb 100644 --- a/app/api/service/JwtTokenService.php +++ b/app/api/service/JwtTokenService.php @@ -79,11 +79,11 @@ class JwtTokenService return $jwtData; } catch(\Firebase\JWT\SignatureInvalidException $e) { throw new \think\Exception('签名错误'); - }catch(\Firebase\JWT\BeforeValidException $e) { + } catch(\Firebase\JWT\BeforeValidException $e) { throw new \think\Exception('token无效'); - }catch(\Firebase\JWT\ExpiredException $e) { + } catch(\Firebase\JWT\ExpiredException $e) { throw new \think\Exception('token已过期'); - }catch(\Exception $e) { + } catch(\Exception $e) { throw new \think\Exception('非法请求'); } }