From 7ae23e17d8e90dc634f3f86e2eee209cbacaace3 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Mon, 30 Nov 2020 17:15:53 +0800
Subject: [PATCH] 20201130

---
 src/main/java/com/xcong/excoin/configurations/security/TokenFilter.java |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/configurations/security/TokenFilter.java b/src/main/java/com/xcong/excoin/configurations/security/TokenFilter.java
index 5ed6bcb..e98bac2 100644
--- a/src/main/java/com/xcong/excoin/configurations/security/TokenFilter.java
+++ b/src/main/java/com/xcong/excoin/configurations/security/TokenFilter.java
@@ -55,9 +55,9 @@
                 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);
@@ -96,7 +96,8 @@
                 // 去掉令牌前缀
                 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];

--
Gitblit v1.9.1