刷新Token补充更新

This commit is contained in:
slience-me
2025-04-15 16:49:50 +08:00
parent f03e6fe98f
commit 9bb4b8cb27
2 changed files with 4 additions and 4 deletions

View File

@@ -128,8 +128,7 @@ public class JwtTokenManager implements TokenManager {
@Override
public boolean validateRefreshToken(String refreshToken) {
// TODO 刷新令牌逻辑
return false;
return this.validateToken(refreshToken);
}
/**
@@ -182,7 +181,7 @@ public class JwtTokenManager implements TokenManager {
}
Authentication authentication = parseToken(refreshToken);
int accessTokenExpiration = securityProperties.getSession().getRefreshTokenTimeToLive();
int accessTokenExpiration = securityProperties.getSession().getAccessTokenTimeToLive();
String newAccessToken = generateToken(authentication, accessTokenExpiration);
return AuthenticationToken.builder()

View File

@@ -85,6 +85,7 @@ security:
- /api/v1/auth/login/** # 登录接口(账号密码登录、手机验证码登录和微信登录)
- /api/v1/auth/captcha # 验证码获取接口
- /api/v1/auth/refresh-token # 刷新令牌接口
- /api/v1/auth/logout # 开放退出登录
- /ws/** # WebSocket接口
# 非安全端点路径允许匿名访问的API
unsecured-urls:
@@ -220,4 +221,4 @@ captcha:
wx:
miniapp:
app-id: xxxxxx
app-secret: xxxxxx
app-secret: xxxxxx