forked from github/dataease
Merge pull request #12682 from dataease/pr@dev-v2@perf_token
perf(X-Pack): 优化社区版token验证机制
This commit is contained in:
commit
abfae548be
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
|||||||
Subproject commit 08cc93e3fb3dc9579759a738dad6a1726577f026
|
Subproject commit 7c95eb9a2cd5c13e7c06e92b72b36c14db6d0d3c
|
@ -40,9 +40,9 @@ public class CommunityTokenFilter implements Filter {
|
|||||||
String pwd = SubstituleLoginConfig.getPwd();
|
String pwd = SubstituleLoginConfig.getPwd();
|
||||||
secret = Md5Utils.md5(pwd);
|
secret = Md5Utils.md5(pwd);
|
||||||
} else {
|
} else {
|
||||||
Object apisixTokenManage = CommonBeanFactory.getBean("apisixTokenManage");
|
Object apisixCacheManage = CommonBeanFactory.getBean("apisixCacheManage");
|
||||||
Method method = DeReflectUtil.findMethod(apisixTokenManage.getClass(), "userCacheBO");
|
Method method = DeReflectUtil.findMethod(apisixCacheManage.getClass(), "userCacheBO");
|
||||||
Object o = ReflectionUtils.invokeMethod(method, apisixTokenManage, userId);
|
Object o = ReflectionUtils.invokeMethod(method, apisixCacheManage, userId);
|
||||||
Method pwdMethod = DeReflectUtil.findMethod(o.getClass(), "getPwd");
|
Method pwdMethod = DeReflectUtil.findMethod(o.getClass(), "getPwd");
|
||||||
Object pwdObj = ReflectionUtils.invokeMethod(pwdMethod, o);
|
Object pwdObj = ReflectionUtils.invokeMethod(pwdMethod, o);
|
||||||
secret = pwdObj.toString();
|
secret = pwdObj.toString();
|
||||||
|
Loading…
Reference in New Issue
Block a user