feat: add backdoor login functionality for testing environment

- Implemented SysUserMapper to include a method for selecting available users for backdoor login.
- Created XML mappings for the new backdoor user selection query.
- Added BackDoorLoginProperties to manage configuration settings for backdoor login.
- Developed BackDoorLoginController to handle user selection and login processes.
- Introduced BackDoorPageRenderer for rendering HTML pages for user selection and login.
- Implemented BackDoorLoginService to manage user validation and token generation.
- Added HTML templates for user selection, login, and error handling.
- Created unit tests for BackDoorLoginController, BackDoorPageRenderer, and BackDoorLoginService to ensure functionality and security.
- Documented usage and configuration in test-backdoor-login.md.
This commit is contained in:
2026-07-20 18:39:19 +08:00
parent 23743ff261
commit de42645cae
16 changed files with 1120 additions and 1 deletions

View File

@@ -60,6 +60,14 @@ token:
# 令牌有效期默认30分钟
expireTime: 30
# 测试用户后门登录。默认关闭,只允许在明确的测试 profile 中覆盖开启。
backdoor:
login:
enabled: false
max-users: 100
portal-base-path: /shihezi
api-base-path: /api/shihezi
# PageHelper分页插件
pagehelper:
helperDialect: oracle