| | |
| | | |
| | | public static boolean isBrowser(HttpServletRequest request) { |
| | | String userAgent = request.getHeader("user-agent"); |
| | | log.info("#--->{}#", userAgent); |
| | | if (userAgent.toLowerCase().contains("mobile") || userAgent.toLowerCase().contains("okhttp")) { |
| | | return false; |
| | | } |
| | |
| | | redisKey = AppContants.APP_LOGIN_PREFIX + token; |
| | | } |
| | | |
| | | log.info("---->{}", redisKey); |
| | | String loginStr = (String) redisUtils.get(redisKey); |
| | | log.info("---->{}", loginStr); |
| | | if (StrUtil.isNotBlank(loginStr)) { |
| | | MemberEntity loginUser = JSONObject.parseObject(loginStr, MemberEntity.class); |
| | | Authentication authentication = new UsernamePasswordAuthenticationToken(loginUser, token, new ArrayList<>()); |