From 2af8e817bd20d27b9814626e4e3c3d90f2898c23 Mon Sep 17 00:00:00 2001
From: 若依 <yzz_ivy@163.com>
Date: Mon, 22 Aug 2022 14:32:49 +0800
Subject: [PATCH] !233 密码变量命名风格统一 Merge pull request !233 from taest/N/A
---
ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/CacheConstants.java | 37 ++++++++++++++++++++++++++-----------
1 files changed, 26 insertions(+), 11 deletions(-)
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/CacheConstants.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/CacheConstants.java
index c5ccb44..38e556b 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/CacheConstants.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/CacheConstants.java
@@ -1,21 +1,31 @@
package com.ruoyi.common.core.constant;
/**
- * 缓存的key 常量
+ * 缓存常量信息
*
* @author ruoyi
*/
public class CacheConstants
{
/**
- * 令牌自定义标识
+ * 缓存有效期,默认720(分钟)
*/
- public static final String TOKEN_AUTHENTICATION = "Authorization";
+ public final static long EXPIRATION = 720;
/**
- * 令牌前缀
+ * 缓存刷新时间,默认120(分钟)
*/
- public static final String TOKEN_PREFIX = "Bearer ";
+ public final static long REFRESH_TIME = 120;
+
+ /**
+ * 密码最大错误次数
+ */
+ public final static int PASSWORD_MAX_RETRY_COUNT = 5;
+
+ /**
+ * 密码锁定时间,默认10(分钟)
+ */
+ public final static long PASSWORD_LOCK_TIME = 10;
/**
* 权限缓存前缀
@@ -23,17 +33,22 @@
public final static String LOGIN_TOKEN_KEY = "login_tokens:";
/**
- * 用户ID字段
+ * 验证码 redis key
*/
- public static final String DETAILS_USER_ID = "user_id";
+ public static final String CAPTCHA_CODE_KEY = "captcha_codes:";
/**
- * 用户名字段
+ * 参数管理 cache key
*/
- public static final String DETAILS_USERNAME = "username";
+ public static final String SYS_CONFIG_KEY = "sys_config:";
/**
- * 授权信息字段
+ * 字典管理 cache key
*/
- public static final String AUTHORIZATION_HEADER = "authorization";
+ public static final String SYS_DICT_KEY = "sys_dict:";
+
+ /**
+ * 登录账户密码错误次数 redis key
+ */
+ public static final String PWD_ERR_CNT_KEY = "pwd_err_cnt:";
}
--
Gitblit v1.9.3