feat(auth): 实现认证功能与Token管理

- 新增AuthController处理登录、登出及Token刷新接口
- 添加CustomDaoAuthenticationProvider支持用户名密码认证
- 引入RefreshTokenAuthenticationToken和RefreshTokenAuthProvider实现刷新令牌认证
- 扩展TokenRedisStorage支持分离存储Access Token与Refresh Token
- 更新SecurityProps配置支持独立设置Access与Refresh Token过期时间
- 集成SpringDoc自定义登录/登出API文档
- 添加LoginResponse、TokenRefreshRequest及TokenRefreshResponse DTO类
- 调整WebSecurityConfig以适配新的认证流程与过滤器链配置
This commit is contained in:
zkh
2025-11-22 12:05:27 +08:00
parent 5029ae6664
commit c2f2d0518b
15 changed files with 535 additions and 57 deletions

View File

@ -71,6 +71,11 @@
<artifactId>zkh-data</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-common</artifactId>
<version>1.8.0</version>
</dependency>
</dependencies>
</dependencyManagement>