perf(X-Pack): 优化社区版token验证机制

This commit is contained in:
fit2cloud-chenyw 2024-10-14 11:58:00 +08:00
parent 4c6800ded7
commit b28b00850a
2 changed files with 4 additions and 4 deletions

@ -1 +1 @@
Subproject commit 08cc93e3fb3dc9579759a738dad6a1726577f026
Subproject commit 7c95eb9a2cd5c13e7c06e92b72b36c14db6d0d3c

View File

@ -40,9 +40,9 @@ public class CommunityTokenFilter implements Filter {
String pwd = SubstituleLoginConfig.getPwd();
secret = Md5Utils.md5(pwd);
} else {
Object apisixTokenManage = CommonBeanFactory.getBean("apisixTokenManage");
Method method = DeReflectUtil.findMethod(apisixTokenManage.getClass(), "userCacheBO");
Object o = ReflectionUtils.invokeMethod(method, apisixTokenManage, userId);
Object apisixCacheManage = CommonBeanFactory.getBean("apisixCacheManage");
Method method = DeReflectUtil.findMethod(apisixCacheManage.getClass(), "userCacheBO");
Object o = ReflectionUtils.invokeMethod(method, apisixCacheManage, userId);
Method pwdMethod = DeReflectUtil.findMethod(o.getClass(), "getPwd");
Object pwdObj = ReflectionUtils.invokeMethod(pwdMethod, o);
secret = pwdObj.toString();