| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.lf.server.entity.all.HttpStatus; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.all.StaticData; |
| | | import com.lf.server.entity.all.SettingData; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.helper.WebHelper; |
| | |
| | | private static final String NO_TOKEN = JSON.toJSONString(new ResponseMsg<String>(HttpStatus.TOKEN_ERROR, "找不到令牌")); |
| | | |
| | | private static final String NO_LOGIN = JSON.toJSONString(new ResponseMsg<String>(HttpStatus.NO_LOGIN_ERROR, "用户未登录")); |
| | | |
| | | |
| | | public AuthInterceptor(TokenService tokenService) { |
| | | this.tokenService = tokenService; |
| | |
| | | */ |
| | | private static boolean noNeedAuth(HttpServletRequest request) { |
| | | String uri = request.getRequestURI().toLowerCase(); |
| | | for (String page : StaticData.EXCLUDE_PATH) { |
| | | for (String page : SettingData.EXCLUDE_PATH) { |
| | | if (uri.contains(page)) { |
| | | return true; |
| | | } |