feat(db): 迁移数据库迁移脚本 V1-V5(任务 T1.1) #4
+4
@@ -198,6 +198,8 @@ public class JwtKeyServiceImpl implements JwtKeyService {
|
||||
try {
|
||||
String initialKey;
|
||||
|
||||
logger.info("Configured JWT secret: {}", configuredSecret != null ? "present (length: " + configuredSecret.length() + ")" : "null");
|
||||
|
||||
if (configuredSecret != null && !configuredSecret.isEmpty()) {
|
||||
if (configuredSecret.startsWith("enc:")) {
|
||||
initialKey = decryptKey(configuredSecret.substring(4));
|
||||
@@ -216,6 +218,8 @@ public class JwtKeyServiceImpl implements JwtKeyService {
|
||||
logger.info("Generated new secure JWT key");
|
||||
}
|
||||
|
||||
logger.info("JWT key length: {}", initialKey.length());
|
||||
|
||||
SecretKey signingKey = new SecretKeySpec(
|
||||
initialKey.getBytes(StandardCharsets.UTF_8),
|
||||
KEY_ALGORITHM
|
||||
|
||||
Reference in New Issue
Block a user