From c2105dcbbf07e37faee7c83d8a22d537a87c196e Mon Sep 17 00:00:00 2001 From: WendyYang Date: Sat, 20 Apr 2024 11:37:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=94=A8=E6=88=B7=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/dataSources.xml | 1 - .idea/jarRepositories.xml | 10 + kqapi/logs/error.log | 446 -------------- kqapi/logs/info-20231117-0.log | 92 --- kqapi/logs/info-20231122-0.log | 23 - kqapi/logs/info.log | 80 --- kqapi/pom.xml | 12 + .../ningdatech/kqapi/common/constant/BizConst.java | 88 +-- .../kqapi/common/enumeration/RoleEnum.java | 30 + .../common/handler/GlobalExceptionHandler.java | 9 +- .../ningdatech/kqapi/common/util/HmacAuthUtil.java | 82 --- .../ningdatech/kqapi/security/AuthBeanConfig.java | 31 + .../ningdatech/kqapi/security/AuthProperties.java | 56 ++ .../kqapi/security/WebSecurityConfig.java | 91 +++ .../kqapi/security/config/RedisSessionConfig.java | 54 ++ .../kqapi/security/constant/AuthConst.java | 29 + .../kqapi/security/constant/AuthTypeEnum.java | 49 ++ .../kqapi/security/constant/LoginPlatformEnum.java | 28 + .../kqapi/security/facade/UserAuthLoginFacade.java | 58 ++ .../handler/DefaultExpiredSessionStrategy.java | 38 ++ .../handler/DefaultInvalidSessionStrategy.java | 35 ++ .../handler/DefaultLoginFailureHandler.java | 53 ++ .../handler/DefaultLoginSuccessHandler.java | 42 ++ .../handler/DefaultLogoutSuccessHandler.java | 35 ++ .../kqapi/security/listener/AuthEventListener.java | 82 +++ .../kqapi/security/model/UserInfoDetails.java | 69 +++ .../kqapi/security/model/WebRequestDetails.java | 55 ++ .../security/model/dto/LoginDeviceInfoDTO.java | 20 + .../kqapi/security/model/dto/UserInfoBO.java | 31 + .../security/password/PasswordAuthProvider.java | 42 ++ .../password/PasswordAuthSecurityConfig.java | 51 ++ .../password/PasswordLoginUserDetailService.java | 45 ++ .../password/UsernamePasswordAuthFilter.java | 57 ++ .../password/UsernamePasswordAuthToken.java | 85 +++ .../ningdatech/kqapi/sso/utils/HmacAuthUtil.java | 12 +- .../kqapi/user/controller/UserAuthController.java | 77 +++ .../kqapi/user/controller/UserInfoController.java | 99 ++++ .../ningdatech/kqapi/user/helper/LoginHelper.java | 33 ++ .../kqapi/user/helper/UserInfoHelper.java | 23 + .../kqapi/user/manage/UserInfoManage.java | 248 ++++++++ .../kqapi/user/mapper/UserAuthMapper.java | 16 + .../kqapi/user/mapper/UserAuthMapper.xml | 5 + .../kqapi/user/mapper/UserInfoMapper.java | 16 + .../kqapi/user/mapper/UserInfoMapper.xml | 5 + .../kqapi/user/model/entity/UserAuth.java | 42 ++ .../kqapi/user/model/entity/UserInfo.java | 69 +++ .../user/model/enumerization/AccountStatus.java | 20 + .../user/model/po/ChangeAccountStatusReq.java | 28 + .../kqapi/user/model/po/ModifyPasswordReq.java | 31 + .../kqapi/user/model/po/SaveUserReq.java | 52 ++ .../kqapi/user/model/po/UserListReq.java | 35 ++ .../kqapi/user/model/vo/ResUserListVO.java | 41 ++ .../kqapi/user/model/vo/UserBasicInfoVO.java | 32 + .../kqapi/user/model/vo/UserDetailVO.java | 48 ++ .../kqapi/user/service/IUserAuthService.java | 28 + .../kqapi/user/service/IUserInfoService.java | 39 ++ .../user/service/impl/UserAuthServiceImpl.java | 33 ++ .../user/service/impl/UserInfoServiceImpl.java | 22 + .../com/ningdatech/kqapi/user/util/BizUtils.java | 81 +++ .../kqapi/user/util/LoginUserContext.java | 36 ++ .../ningdatech/kqapi/user/util/LoginUserUtil.java | 25 + kqapi/src/main/resources/security/auth-dev.yml | 34 ++ kqapi/src/main/resources/security/auth-prod.yml | 39 ++ .../META-INF/spring-configuration-metadata.json | 45 ++ .../common/handler/GlobalExceptionHandler.class | Bin 5138 -> 4835 bytes logs/error-20231031-0.log | 42 -- logs/error-20231102-0.log | 73 --- logs/error-20240103-0.log | 388 ------------- logs/error-20240104-0.log | 643 --------------------- logs/error-20240402-0.log | 134 ----- logs/error.log | 45 -- logs/info-20231122-0.log | 29 - logs/info-20240112-0.log | 69 --- logs/info.log | 53 -- 74 files changed, 2510 insertions(+), 2289 deletions(-) delete mode 100644 kqapi/logs/error.log delete mode 100644 kqapi/logs/info-20231117-0.log delete mode 100644 kqapi/logs/info-20231122-0.log delete mode 100644 kqapi/logs/info.log create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/common/enumeration/RoleEnum.java delete mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/common/util/HmacAuthUtil.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/security/AuthBeanConfig.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/security/AuthProperties.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/security/WebSecurityConfig.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/security/config/RedisSessionConfig.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/security/constant/AuthConst.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/security/constant/AuthTypeEnum.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/security/constant/LoginPlatformEnum.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/security/facade/UserAuthLoginFacade.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/security/handler/DefaultExpiredSessionStrategy.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/security/handler/DefaultInvalidSessionStrategy.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/security/handler/DefaultLoginFailureHandler.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/security/handler/DefaultLoginSuccessHandler.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/security/handler/DefaultLogoutSuccessHandler.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/security/listener/AuthEventListener.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/security/model/UserInfoDetails.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/security/model/WebRequestDetails.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/security/model/dto/LoginDeviceInfoDTO.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/security/model/dto/UserInfoBO.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/security/password/PasswordAuthProvider.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/security/password/PasswordAuthSecurityConfig.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/security/password/PasswordLoginUserDetailService.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/security/password/UsernamePasswordAuthFilter.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/security/password/UsernamePasswordAuthToken.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/user/controller/UserAuthController.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/user/controller/UserInfoController.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/user/helper/LoginHelper.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/user/helper/UserInfoHelper.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/user/manage/UserInfoManage.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/user/mapper/UserAuthMapper.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/user/mapper/UserAuthMapper.xml create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/user/mapper/UserInfoMapper.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/user/mapper/UserInfoMapper.xml create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/user/model/entity/UserAuth.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/user/model/entity/UserInfo.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/user/model/enumerization/AccountStatus.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/user/model/po/ChangeAccountStatusReq.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/user/model/po/ModifyPasswordReq.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/user/model/po/SaveUserReq.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/user/model/po/UserListReq.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/user/model/vo/ResUserListVO.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/user/model/vo/UserBasicInfoVO.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/user/model/vo/UserDetailVO.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/user/service/IUserAuthService.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/user/service/IUserInfoService.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/user/service/impl/UserAuthServiceImpl.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/user/service/impl/UserInfoServiceImpl.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/user/util/BizUtils.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/user/util/LoginUserContext.java create mode 100644 kqapi/src/main/java/com/ningdatech/kqapi/user/util/LoginUserUtil.java create mode 100644 kqapi/src/main/resources/security/auth-dev.yml create mode 100644 kqapi/src/main/resources/security/auth-prod.yml delete mode 100644 logs/error-20231031-0.log delete mode 100644 logs/error-20231102-0.log delete mode 100644 logs/error-20240103-0.log delete mode 100644 logs/error-20240104-0.log delete mode 100644 logs/error-20240402-0.log delete mode 100644 logs/error.log delete mode 100644 logs/info-20231122-0.log delete mode 100644 logs/info-20240112-0.log delete mode 100644 logs/info.log diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml index f376c76..ad385f8 100644 --- a/.idea/dataSources.xml +++ b/.idea/dataSources.xml @@ -2,7 +2,6 @@ - java.sql.Driver true true com.kingbase8.Driver diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml index af68372..77bbaf5 100644 --- a/.idea/jarRepositories.xml +++ b/.idea/jarRepositories.xml @@ -8,10 +8,20 @@ + + + +