(improvement)(build) Fixed the issue of unable to download JDK on CentOS. (#1118)

This commit is contained in:
lexluo09
2024-06-09 11:10:15 +08:00
committed by GitHub
parent 915d4ec4c2
commit 9584d7bb2c
2 changed files with 16 additions and 3 deletions

View File

@@ -12,6 +12,7 @@ import com.tencent.supersonic.auth.authentication.persistence.repository.UserRep
import com.tencent.supersonic.auth.authentication.utils.AESEncryptionUtil;
import com.tencent.supersonic.auth.authentication.utils.UserTokenUtils;
import com.tencent.supersonic.common.util.ContextUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import java.util.List;
import java.util.Set;
@@ -20,6 +21,7 @@ import java.util.stream.Collectors;
/**
* DefaultUserAdaptor provides a default method to obtain user and organization information
*/
@Slf4j
public class DefaultUserAdaptor implements UserAdaptor {
private List<UserDO> getUserDOList() {
@@ -76,7 +78,7 @@ public class DefaultUserAdaptor implements UserAdaptor {
try {
byte[] salt = AESEncryptionUtil.generateSalt(userDO.getName());
userDO.setSalt(AESEncryptionUtil.getStringFromBytes(salt));
System.out.println("salt: " + userDO.getSalt());
log.info("salt: " + userDO.getSalt());
userDO.setPassword(AESEncryptionUtil.encrypt(userReq.getPassword(), salt));
} catch (Exception e) {
throw new RuntimeException("password encrypt error, please try again");