VerificationCodeServiceImpl

@Service
class VerificationCodeServiceImpl(stringRedisTemplate: StringRedisTemplate, oauth2Properties: Oauth2Properties) : AbstractVerificationCodeService

验证码服务实现

使用 Redis 存储验证码,并通过日志输出短信与邮件内容

Author

lishangbu

Since

2026/3/13

Constructors

Link copied to clipboard
constructor(stringRedisTemplate: StringRedisTemplate, oauth2Properties: Oauth2Properties)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun generateCode(target: String, type: String): String

生成状态码

Link copied to clipboard
open override fun verifyCode(target: String, code: String, type: String)

返回校验状态码