user password 加密

This commit is contained in:
hc
2025-08-31 23:10:47 +08:00
parent 7199921255
commit 06186c669e
2 changed files with 5 additions and 0 deletions

View File

@@ -30,6 +30,7 @@ public class User implements UserDetails {
@Column
private String nickname;
@Convert(converter = AesAttributeConverter.class)
@Column()
private String password;

View File

@@ -152,6 +152,10 @@ public class JwtUtil {
// 3. 比对refreshId一致性
String tokenRefreshId = claims.get("refreshId", String.class);
// 添加调试日志
logger.info("验证refresh token: userId={}, tokenRefreshId={}, storedRefreshId={}", userId, tokenRefreshId, storedRefreshId);
if (!storedRefreshId.equals(tokenRefreshId)) {
throw new SecurityException("Refresh Token无效");
}