refactor: 验证码redis的key前缀重命名

This commit is contained in:
郝先瑞 2022-05-17 21:49:07 +08:00
parent 8eb1c68748
commit a5f5afd4ae
2 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ public class CaptchaTokenGranter extends AbstractTokenGranter {
String uuid = parameters.get("uuid");
Assert.isTrue(StrUtil.isNotBlank(validateCode), "验证码不能为空");
String validateCodeKey = SecurityConstants.VALIDATE_CODE_PREFIX + uuid;
String validateCodeKey = SecurityConstants.VALIDATION_CODE_KEY_PREFIX + uuid;
// 从缓存取出正确的验证码和用户输入的验证码比对
String correctValidateCode = redisTemplate.opsForValue().get(validateCodeKey);

View File

@ -68,7 +68,7 @@ public interface SecurityConstants {
/**
* 验证码key前缀
*/
String VALIDATE_CODE_PREFIX = "VALIDATE_CODE:";
String VALIDATION_CODE_KEY_PREFIX = "CAPTCHA:";
/**
* 短信验证码key前缀