user password 加密
This commit is contained in:
@@ -30,6 +30,7 @@ public class User implements UserDetails {
|
||||
@Column
|
||||
private String nickname;
|
||||
|
||||
@Convert(converter = AesAttributeConverter.class)
|
||||
@Column()
|
||||
private String password;
|
||||
|
||||
|
||||
@@ -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无效");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user