From 06186c669e2a5998e3d4108ab930a01949a6bd01 Mon Sep 17 00:00:00 2001 From: hc Date: Sun, 31 Aug 2025 23:10:47 +0800 Subject: [PATCH] =?UTF-8?q?user=20password=20=E5=8A=A0=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/onekeycall/videotablet/entity/User.java | 1 + src/main/java/com/onekeycall/videotablet/utils/JwtUtil.java | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/main/java/com/onekeycall/videotablet/entity/User.java b/src/main/java/com/onekeycall/videotablet/entity/User.java index f5ec9f7..0d274bc 100644 --- a/src/main/java/com/onekeycall/videotablet/entity/User.java +++ b/src/main/java/com/onekeycall/videotablet/entity/User.java @@ -30,6 +30,7 @@ public class User implements UserDetails { @Column private String nickname; + @Convert(converter = AesAttributeConverter.class) @Column() private String password; diff --git a/src/main/java/com/onekeycall/videotablet/utils/JwtUtil.java b/src/main/java/com/onekeycall/videotablet/utils/JwtUtil.java index a82644d..d4a1718 100644 --- a/src/main/java/com/onekeycall/videotablet/utils/JwtUtil.java +++ b/src/main/java/com/onekeycall/videotablet/utils/JwtUtil.java @@ -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无效"); }