同步框架更新

This commit is contained in:
yaoyn
2025-02-15 17:05:09 +08:00
parent 29b5c68564
commit 9b7d27a2b4
141 changed files with 585 additions and 133 deletions

View File

@ -243,10 +243,10 @@ public class LoginServiceImpl implements ILoginService {
}
/**
* 判断用户名和密码是否正确有2中情况1账号密码登录2互信token登录
* 方式1是传入的未加密的密码方式2传入的是通过md5已加密的密码所以通过判断密码的长度来判断是否已加密
* */
/**
* 判断用户名和密码是否正确有2中情况1账号密码登录2互信token登录
* 方式1是传入的未加密的密码方式2传入的是通过md5已加密的密码所以通过判断密码的长度来判断是否已加密
* */
public boolean checkPassword(User loginUser,LoginDto dto)
{
//如果长度是32,即传入的是密文
@ -254,7 +254,7 @@ public class LoginServiceImpl implements ILoginService {
return (loginUser == null || !StrUtil.equals(loginUser.getPassword(), dto.getPassword()));
}
else {
return (loginUser == null || !StrUtil.equals(loginUser.getPassword(), SaSecureUtil.md5BySalt(dto.getPassword(), GlobalConstant.SECRET_KEY)));
return (loginUser == null || !StrUtil.equals(loginUser.getPassword(), SaSecureUtil.md5BySalt(dto.getPassword(), GlobalConstant.SECRET_KEY)));
}
}

View File

@ -204,7 +204,11 @@ public class SsoServiceImpl implements SsoService {
@Override
public String auth(String ltpasToken){
String loginid = this.decodeToken(ltpasToken);
if(openLoginLog){
log.info("秘钥 {} 解码后的用户名是:{}",ltpasToken,loginid);
}
if(StringUtils.isNotBlank(loginid)){
return loginid;
}
@ -377,6 +381,9 @@ public class SsoServiceImpl implements SsoService {
}
private String decodeToken(String ltpasToken) {
if(openLoginLog){
log.info("登录秘钥是:{} ",ltpasToken);
}
if (StringUtils.isEmpty(ltpasToken)) {
return null;
}
@ -392,6 +399,11 @@ public class SsoServiceImpl implements SsoService {
}
Long begin = Long.parseLong(ltpasTokenInfo[1]);
Long end = Long.parseLong(ltpasTokenInfo[2]);
if(openLoginLog){
log.info("互信秘钥解密过程参数now:{},ltpasTokenDecode:{},secretKey:{}",now,ltpasTokenDecode,secretKey);
}
if(now >= begin && now <= end) {
return eIN;
}