实现邮箱验证码登录功能

- 新增VerificationCodeService:验证码生成、发送、验证
- 新增VerificationCodeController:验证码相关API接口
- 扩展AuthApiController:支持邮箱验证码登录
- 扩展UserRepository和UserService:支持邮箱查找用户
- 使用内存存储验证码,无需Redis依赖
- 添加腾讯云配置支持(可选)
- 实现安全机制:频率限制、有效期、一次性使用
- 添加详细文档说明
This commit is contained in:
AIGC Developer
2025-10-23 10:27:36 +08:00
parent 08b737b1ef
commit 68574fe33f
11 changed files with 860 additions and 3 deletions

View File

@@ -125,6 +125,21 @@
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<!-- 腾讯云SDK -->
<dependency>
<groupId>com.tencentcloudapi</groupId>
<artifactId>tencentcloud-sdk-java</artifactId>
<version>3.1.880</version>
</dependency>
<!-- Redis支持 (可选,当前使用内存存储) -->
<!--
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>