|
@@ -32,6 +32,8 @@ import org.springframework.web.context.request.RequestContextHolder;
|
|
import org.springframework.web.context.request.ServletRequestAttributes;
|
|
import org.springframework.web.context.request.ServletRequestAttributes;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
+import java.io.UnsupportedEncodingException;
|
|
|
|
+import java.net.URLDecoder;
|
|
import java.nio.charset.StandardCharsets;
|
|
import java.nio.charset.StandardCharsets;
|
|
import java.security.KeyFactory;
|
|
import java.security.KeyFactory;
|
|
import java.security.PrivateKey;
|
|
import java.security.PrivateKey;
|
|
@@ -94,10 +96,18 @@ public class AuthServiceImpl implements AuthService {
|
|
if (StringUtils.isBlank(salt.getSalt())) {
|
|
if (StringUtils.isBlank(salt.getSalt())) {
|
|
throw new BaseException("盐值不能为空");
|
|
throw new BaseException("盐值不能为空");
|
|
}
|
|
}
|
|
- log.info("盐值: " + salt.getSalt());
|
|
|
|
|
|
+ log.info("解密前的盐值: " + salt.getSalt());
|
|
|
|
|
|
String saltData = salt.getSalt();
|
|
String saltData = salt.getSalt();
|
|
|
|
|
|
|
|
+ try {
|
|
|
|
+ saltData = URLDecoder.decode(saltData, "UTF-8");
|
|
|
|
+ log.info("解密后的盐值: " + saltData);
|
|
|
|
+ } catch (UnsupportedEncodingException e) {
|
|
|
|
+ log.error("解密盐值异常", e);
|
|
|
|
+ throw new RuntimeException(e);
|
|
|
|
+ }
|
|
|
|
+
|
|
AccessToken accessToken = null;
|
|
AccessToken accessToken = null;
|
|
long now = System.currentTimeMillis();
|
|
long now = System.currentTimeMillis();
|
|
String decryptedData = null;
|
|
String decryptedData = null;
|