| | |
| | | String redisKey = ""; |
| | | // 根据user-agent判断pc端还是app端 |
| | | if (LoginUserUtils.isBrowser(request)) { |
| | | redisKey = token; |
| | | redisKey = token;; |
| | | } else { |
| | | redisKey = token; |
| | | redisKey = token;; |
| | | } |
| | | |
| | | String loginStr = (String) redisUtils.get(redisKey); |
| | |
| | | // 去掉令牌前缀 |
| | | String rsaToken = bearerToken.replace(AppContants.TOKEN_START_WITH, ""); |
| | | RSA rsa = new RSA(securityProperties.getPrivateKey(), null); |
| | | String[] tokens = StrUtil.split(rsa.decryptStr(rsaToken, KeyType.PrivateKey), "_"); |
| | | String decryptStr = rsa.decryptStr(rsaToken, KeyType.PrivateKey); |
| | | String[] tokens = StrUtil.split(decryptStr, "_"); |
| | | |
| | | if (StrUtil.isNotEmpty(requestURL) && requestURL.toString().contains(tokens[2])) { |
| | | return tokens[0]; |