From 7079a4e7e41fa803b226709e4ea393c849fd4ddf Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期三, 10 十一月 2021 13:31:54 +0800 Subject: [PATCH] update satoken 1.27.0 => 1.28.0 使用 jwt 插件代理 token 生成逻辑 --- ruoyi-common/src/main/java/com/ruoyi/common/constant/UserConstants.java | 87 ++++++++++++++++++++++++++++++++++--------- 1 files changed, 68 insertions(+), 19 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/constant/UserConstants.java b/ruoyi-common/src/main/java/com/ruoyi/common/constant/UserConstants.java index 56b46ba..fa88e7c 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/constant/UserConstants.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/constant/UserConstants.java @@ -2,62 +2,111 @@ /** * 鐢ㄦ埛甯搁噺淇℃伅 - * + * * @author ruoyi */ -public class UserConstants -{ +public class UserConstants { + /** * 骞冲彴鍐呯郴缁熺敤鎴风殑鍞竴鏍囧織 */ public static final String SYS_USER = "SYS_USER"; - /** 姝e父鐘舵�� */ + /** + * 姝e父鐘舵�� + */ public static final String NORMAL = "0"; - /** 寮傚父鐘舵�� */ + /** + * 寮傚父鐘舵�� + */ public static final String EXCEPTION = "1"; - /** 鐢ㄦ埛灏佺鐘舵�� */ + /** + * 鐢ㄦ埛灏佺鐘舵�� + */ public static final String USER_DISABLE = "1"; - /** 瑙掕壊灏佺鐘舵�� */ + /** + * 瑙掕壊灏佺鐘舵�� + */ public static final String ROLE_DISABLE = "1"; - /** 閮ㄩ棬姝e父鐘舵�� */ + /** + * 閮ㄩ棬姝e父鐘舵�� + */ public static final String DEPT_NORMAL = "0"; - /** 閮ㄩ棬鍋滅敤鐘舵�� */ + /** + * 閮ㄩ棬鍋滅敤鐘舵�� + */ public static final String DEPT_DISABLE = "1"; - /** 瀛楀吀姝e父鐘舵�� */ + /** + * 瀛楀吀姝e父鐘舵�� + */ public static final String DICT_NORMAL = "0"; - /** 鏄惁涓虹郴缁熼粯璁わ紙鏄級 */ + /** + * 鏄惁涓虹郴缁熼粯璁わ紙鏄級 + */ public static final String YES = "Y"; - /** 鏄惁鑿滃崟澶栭摼锛堟槸锛� */ + /** + * 鏄惁鑿滃崟澶栭摼锛堟槸锛� + */ public static final String YES_FRAME = "0"; - /** 鏄惁鑿滃崟澶栭摼锛堝惁锛� */ + /** + * 鏄惁鑿滃崟澶栭摼锛堝惁锛� + */ public static final String NO_FRAME = "1"; - /** 鑿滃崟绫诲瀷锛堢洰褰曪級 */ + /** + * 鑿滃崟绫诲瀷锛堢洰褰曪級 + */ public static final String TYPE_DIR = "M"; - /** 鑿滃崟绫诲瀷锛堣彍鍗曪級 */ + /** + * 鑿滃崟绫诲瀷锛堣彍鍗曪級 + */ public static final String TYPE_MENU = "C"; - /** 鑿滃崟绫诲瀷锛堟寜閽級 */ + /** + * 鑿滃崟绫诲瀷锛堟寜閽級 + */ public static final String TYPE_BUTTON = "F"; - /** Layout缁勪欢鏍囪瘑 */ + /** + * Layout缁勪欢鏍囪瘑 + */ public final static String LAYOUT = "Layout"; - /** ParentView缁勪欢鏍囪瘑 */ + /** + * ParentView缁勪欢鏍囪瘑 + */ public final static String PARENT_VIEW = "ParentView"; - /** 鏍¢獙杩斿洖缁撴灉鐮� */ + /** + * InnerLink缁勪欢鏍囪瘑 + */ + public final static String INNER_LINK = "InnerLink"; + + /** + * 鏍¢獙杩斿洖缁撴灉鐮� + */ public final static String UNIQUE = "0"; public final static String NOT_UNIQUE = "1"; + + /** + * 鐢ㄦ埛鍚嶉暱搴﹂檺鍒� + */ + public static final int USERNAME_MIN_LENGTH = 2; + public static final int USERNAME_MAX_LENGTH = 20; + + /** + * 瀵嗙爜闀垮害闄愬埗 + */ + public static final int PASSWORD_MIN_LENGTH = 5; + public static final int PASSWORD_MAX_LENGTH = 20; } -- Gitblit v1.9.3