【8.0】【auth】更新配置密码策略

pull/57/head
fengshuonan 2023-10-03 22:06:51 +08:00
parent feaa59020c
commit 59e44f2ab8
2 changed files with 22 additions and 0 deletions

View File

@ -99,4 +99,24 @@ public class LoginConfigExpander {
return ConfigContext.me().getSysConfigValueWithDefault("SYS_LOGIN_PASSWORD_MIN_NUMBER_COUNT", Integer.class, 0);
}
/**
*
*
* @author fengshuonan
* @since 2023/10/3 21:27
*/
public static Integer getPasswordMinUpdateDays() {
return ConfigContext.me().getSysConfigValueWithDefault("SYS_LOGIN_PASSWORD_MIN_UPDATE_DAYS", Integer.class, 180);
}
/**
*
*
* @author fengshuonan
* @since 2023/10/3 21:50
*/
public static Integer getPasswordMinCantRepeatTimes() {
return ConfigContext.me().getSysConfigValueWithDefault("SYS_LOGIN_PASSWORD_MIN_CANT_REPEAT_TIMES", Integer.class, 0);
}
}

View File

@ -4,3 +4,5 @@ INSERT INTO `sys_config`(`config_id`, `config_name`, `config_code`, `config_valu
INSERT INTO `sys_config`(`config_id`, `config_name`, `config_code`, `config_value`, `sys_flag`, `remark`, `status_flag`, `group_code`, `del_flag`, `create_time`, `create_user`, `update_time`, `update_user`) VALUES (1709196660577406977, '密码策略:最少大写字母数量', 'SYS_LOGIN_PASSWORD_MIN_UPPER_CASE_COUNT', '0', 'Y', NULL, 1, 'auth_config', 'N', '2023-10-03 21:20:14', 1339550467939639299, NULL, NULL);
INSERT INTO `sys_config`(`config_id`, `config_name`, `config_code`, `config_value`, `sys_flag`, `remark`, `status_flag`, `group_code`, `del_flag`, `create_time`, `create_user`, `update_time`, `update_user`) VALUES (1709196708086288385, '密码策略:最少小写字母数量', 'SYS_LOGIN_PASSWORD_MIN_LOWER_CASE_COUNT', '0', 'Y', NULL, 1, 'auth_config', 'N', '2023-10-03 21:20:25', 1339550467939639299, NULL, NULL);
INSERT INTO `sys_config`(`config_id`, `config_name`, `config_code`, `config_value`, `sys_flag`, `remark`, `status_flag`, `group_code`, `del_flag`, `create_time`, `create_user`, `update_time`, `update_user`) VALUES (1709196753862922241, '密码策略:最少数字符号的数量', 'SYS_LOGIN_PASSWORD_MIN_NUMBER_COUNT', '0', 'Y', NULL, 1, 'auth_config', 'N', '2023-10-03 21:20:36', 1339550467939639299, NULL, NULL);
INSERT INTO `sys_config`(`config_id`, `config_name`, `config_code`, `config_value`, `sys_flag`, `remark`, `status_flag`, `group_code`, `del_flag`, `create_time`, `create_user`, `update_time`, `update_user`) VALUES (1709207802066505730, '密码策略:最少多久更新一次密码,单位天', 'SYS_LOGIN_PASSWORD_MIN_UPDATE_DAYS', '180', 'Y', NULL, 1, 'auth_config', 'N', '2023-10-03 22:04:30', 1339550467939639299, NULL, NULL);
INSERT INTO `sys_config`(`config_id`, `config_name`, `config_code`, `config_value`, `sys_flag`, `remark`, `status_flag`, `group_code`, `del_flag`, `create_time`, `create_user`, `update_time`, `update_user`) VALUES (1709207873369673730, '密码策略:修改密码时,不能和历史密码重复的次数', 'SYS_LOGIN_PASSWORD_MIN_CANT_REPEAT_TIMES', '0', 'Y', NULL, 1, 'auth_config', 'N', '2023-10-03 22:04:47', 1339550467939639299, '2023-10-03 22:05:50', 1339550467939639299);