| | |
| | | return true; |
| | | }catch (ExpiredJwtException ex) { |
| | | log.warn("JWT已过期,Token: {}", token); |
| | | throw new LoginErrorException(MessageConstant.TOKEN_EXPIRED); |
| | | throw new InterceptorException(MessageConstant.TOKEN_EXPIRED); |
| | | } catch (InterceptorException ex) { |
| | | log.warn("JWT已过期,Token: {}", token); |
| | | throw new InterceptorException("该用户已被冻结"); |
| | | log.warn("用户被删除或已被冻结,Token: {}", token); |
| | | throw new InterceptorException("用户被删除或已被冻结"); |
| | | }catch (Exception ex) { |
| | | //4、不通过,响应401状态码 |
| | | throw new LoginErrorException(MessageConstant.USER_NOT_LOGIN); |
| | | throw new InterceptorException(MessageConstant.USER_NOT_LOGIN); |
| | | } |
| | | } |
| | | } |