Commit 64a47c99 by 袁伟铭

Merge remote-tracking branch 'origin/master'

parents cf9aa86c b252f26d
......@@ -145,12 +145,12 @@ public class SingleService {
public Object login(SingleLoginVo vo, HttpServletRequest request, HttpServletResponse response) {
try {
String appId = request.getParameter("appId");
AssertUtils.hasText(appId, "APPID为空");
String toUrl = request.getParameter("service");
AssertUtils.hasText(toUrl, "跳转地址为空");
SysInfo sysInfo = sysInfoDao.selectOne(Wrappers.lambdaQuery(SysInfo.builder().appId(appId).build()));
/* SysInfo sysInfo = sysInfoDao.selectOne(Wrappers.lambdaQuery(SysInfo.builder().appId(appId).build()));
AssertUtils.notNull(sysInfo, "APPID不存在");
AssertUtils.hasText(sysInfo.getHomeUrl(), "业务系统主页地址未配置");
AssertUtils.hasText(sysInfo.getHomeUrl(), "业务系统主页地址未配置");*/
String passwd = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey, vo.getPasswd());
......@@ -168,7 +168,7 @@ public class SingleService {
redisUtils.setStr(token, key, properties.getTokenValidityInSeconds() / 1000, TimeUnit.SECONDS);
Map<String, Object> data = new HashMap<>();
data.put("toUrl", sysInfo.getHomeUrl() + "?" + properties.getHeader() + "=" + token + "&key=" + key);
data.put("toUrl", toUrl + "?" + properties.getHeader() + "=" + token + "&key=" + key);
data.put(properties.getHeader(), properties.getTokenStartWith() + token);
return data;
// response.sendRedirect(sysInfo.getHomeUrl() + "?" + properties.getHeader() + "=" + token + "&key=" + key);
......@@ -180,18 +180,18 @@ public class SingleService {
}
public Object tokenLogin(HttpServletRequest request, HttpServletResponse response) {
String appId = request.getParameter("appId");
AssertUtils.hasText(appId, "APPID为空");
String toUrl = request.getParameter("service");
AssertUtils.hasText(toUrl, "跳转地址为空");
SysInfo sysInfo = sysInfoDao.selectOne(Wrappers.lambdaQuery(SysInfo.builder().appId(appId).build()));
/*SysInfo sysInfo = sysInfoDao.selectOne(Wrappers.lambdaQuery(SysInfo.builder().appId(appId).build()));
AssertUtils.notNull(sysInfo, "APPID不存在");
AssertUtils.hasText(sysInfo.getHomeUrl(), "业务系统主页地址未配置");
AssertUtils.hasText(sysInfo.getHomeUrl(), "业务系统主页地址未配置");*/
String token = tokenProvider.getToken(request);
String key = redisUtils.getStr(token);
Map<String, Object> data = new HashMap<>();
data.put("toUrl", sysInfo.getHomeUrl() + "?" + properties.getHeader() + "=" + token + "&key=" + key);
data.put("toUrl", toUrl + "?" + properties.getHeader() + "=" + token + "&key=" + key);
data.put(properties.getHeader(), properties.getTokenStartWith() + token);
return data;
// response.sendRedirect(sysInfo.getHomeUrl() + "?" + properties.getHeader() + "=" + token + "&key=" + key);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment