From 97f64aba83e783d23078ba73fb733c908fbe5041 Mon Sep 17 00:00:00 2001 From: fengshuonan Date: Wed, 10 May 2023 11:23:43 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=907.6.0=E3=80=91=E3=80=90=E6=A1=86?= =?UTF-8?q?=E6=9E=B6=E6=94=B9=E9=80=A0=E3=80=91=E6=9B=B4=E6=96=B0auth?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E7=9A=84=E8=87=AA=E5=8A=A8=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ration.java => AuthAutoConfiguration.java} | 2 +- .../AuthJwtConfigAutoConfiguration.java | 37 ------------------- ... => PasswordRsaPropAutoConfiguration.java} | 2 +- ...uration.java => SsoAutoConfiguration.java} | 2 +- ...uthTokenMemoryCacheAutoConfiguration.java} | 2 +- ...AuthTokenRedisCacheAutoConfiguration.java} | 2 +- .../main/resources/META-INF/spring.factories | 10 ++--- 7 files changed, 10 insertions(+), 47 deletions(-) rename kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/{GunsAuthAutoConfiguration.java => AuthAutoConfiguration.java} (99%) delete mode 100644 kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/AuthJwtConfigAutoConfiguration.java rename kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/{GunsPasswordRsaPropAutoConfiguration.java => PasswordRsaPropAutoConfiguration.java} (97%) rename kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/{GunsSsoAutoConfiguration.java => SsoAutoConfiguration.java} (97%) rename kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/cache/{GunsAuthTokenMemoryCacheAutoConfiguration.java => AuthTokenMemoryCacheAutoConfiguration.java} (98%) rename kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/cache/{GunsAuthTokenRedisCacheAutoConfiguration.java => AuthTokenRedisCacheAutoConfiguration.java} (98%) diff --git a/kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/GunsAuthAutoConfiguration.java b/kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/AuthAutoConfiguration.java similarity index 99% rename from kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/GunsAuthAutoConfiguration.java rename to kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/AuthAutoConfiguration.java index ef0bb9cee..d5840a9c1 100644 --- a/kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/GunsAuthAutoConfiguration.java +++ b/kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/AuthAutoConfiguration.java @@ -55,7 +55,7 @@ import java.util.Set; * @since 2020/11/30 22:16 */ @Configuration -public class GunsAuthAutoConfiguration { +public class AuthAutoConfiguration { @Resource private PwdRsaSecretProperties pwdRsaSecretProperties; diff --git a/kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/AuthJwtConfigAutoConfiguration.java b/kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/AuthJwtConfigAutoConfiguration.java deleted file mode 100644 index 8dec77bce..000000000 --- a/kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/AuthJwtConfigAutoConfiguration.java +++ /dev/null @@ -1,37 +0,0 @@ -package cn.stylefeng.roses.kernel.auth.starter; - -import cn.stylefeng.roses.kernel.auth.api.expander.JwtConfigExpander; -import cn.stylefeng.roses.kernel.jwt.JwtTokenOperator; -import cn.stylefeng.roses.kernel.jwt.api.JwtApi; -import cn.stylefeng.roses.kernel.jwt.api.pojo.config.JwtConfig; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -/** - * Auth模块对jwt的封装 - * - * @author fengshuonan - * @since 2023/5/9 10:07 - */ -@Configuration -public class AuthJwtConfigAutoConfiguration { - - /** - * jwt操作工具类的配置 - * - * @author fengshuonan - * @since 2020/12/1 14:40 - */ - @Bean - public JwtApi jwtApi() { - - JwtConfig jwtConfig = new JwtConfig(); - - // 从系统配置表中读取配置 - jwtConfig.setJwtSecret(JwtConfigExpander.getJwtSecret()); - jwtConfig.setExpiredSeconds(JwtConfigExpander.getJwtTimeoutSeconds()); - - return new JwtTokenOperator(jwtConfig); - } - -} diff --git a/kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/GunsPasswordRsaPropAutoConfiguration.java b/kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/PasswordRsaPropAutoConfiguration.java similarity index 97% rename from kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/GunsPasswordRsaPropAutoConfiguration.java rename to kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/PasswordRsaPropAutoConfiguration.java index 27dc85f5a..e5c83b09c 100644 --- a/kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/GunsPasswordRsaPropAutoConfiguration.java +++ b/kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/PasswordRsaPropAutoConfiguration.java @@ -37,7 +37,7 @@ import org.springframework.context.annotation.Configuration; * @since 2022/10/16 15:33 */ @Configuration -public class GunsPasswordRsaPropAutoConfiguration { +public class PasswordRsaPropAutoConfiguration { /** * 密码加密传输的配置,RSA加密密钥对 diff --git a/kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/GunsSsoAutoConfiguration.java b/kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/SsoAutoConfiguration.java similarity index 97% rename from kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/GunsSsoAutoConfiguration.java rename to kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/SsoAutoConfiguration.java index da720ceb0..16fc9185e 100644 --- a/kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/GunsSsoAutoConfiguration.java +++ b/kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/SsoAutoConfiguration.java @@ -37,7 +37,7 @@ import org.springframework.context.annotation.Configuration; * @since 2021/5/25 22:29 */ @Configuration -public class GunsSsoAutoConfiguration { +public class SsoAutoConfiguration { /** * 单点的开关配置 diff --git a/kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/cache/GunsAuthTokenMemoryCacheAutoConfiguration.java b/kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/cache/AuthTokenMemoryCacheAutoConfiguration.java similarity index 98% rename from kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/cache/GunsAuthTokenMemoryCacheAutoConfiguration.java rename to kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/cache/AuthTokenMemoryCacheAutoConfiguration.java index 7b894694c..c28594e7e 100644 --- a/kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/cache/GunsAuthTokenMemoryCacheAutoConfiguration.java +++ b/kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/cache/AuthTokenMemoryCacheAutoConfiguration.java @@ -51,7 +51,7 @@ import static cn.stylefeng.roses.kernel.cache.api.constants.CacheConstants.NONE_ */ @Configuration @ConditionalOnMissingClass("org.springframework.data.redis.connection.RedisConnectionFactory") -public class GunsAuthTokenMemoryCacheAutoConfiguration { +public class AuthTokenMemoryCacheAutoConfiguration { /** * 登录用户的缓存,默认使用内存方式 diff --git a/kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/cache/GunsAuthTokenRedisCacheAutoConfiguration.java b/kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/cache/AuthTokenRedisCacheAutoConfiguration.java similarity index 98% rename from kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/cache/GunsAuthTokenRedisCacheAutoConfiguration.java rename to kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/cache/AuthTokenRedisCacheAutoConfiguration.java index cb78bf123..9a3645019 100644 --- a/kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/cache/GunsAuthTokenRedisCacheAutoConfiguration.java +++ b/kernel-d-auth/auth-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/auth/starter/cache/AuthTokenRedisCacheAutoConfiguration.java @@ -48,7 +48,7 @@ import java.util.Set; */ @Configuration @ConditionalOnClass(name = "org.springframework.data.redis.connection.RedisConnectionFactory") -public class GunsAuthTokenRedisCacheAutoConfiguration { +public class AuthTokenRedisCacheAutoConfiguration { /** * 登录用户的缓存,默认使用内存方式 diff --git a/kernel-d-auth/auth-spring-boot-starter/src/main/resources/META-INF/spring.factories b/kernel-d-auth/auth-spring-boot-starter/src/main/resources/META-INF/spring.factories index db95d768f..d9f917987 100644 --- a/kernel-d-auth/auth-spring-boot-starter/src/main/resources/META-INF/spring.factories +++ b/kernel-d-auth/auth-spring-boot-starter/src/main/resources/META-INF/spring.factories @@ -1,6 +1,6 @@ org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - cn.stylefeng.roses.kernel.auth.starter.GunsAuthAutoConfiguration,\ - cn.stylefeng.roses.kernel.auth.starter.GunsSsoAutoConfiguration,\ - cn.stylefeng.roses.kernel.auth.starter.cache.GunsAuthTokenMemoryCacheAutoConfiguration,\ - cn.stylefeng.roses.kernel.auth.starter.cache.GunsAuthTokenRedisCacheAutoConfiguration,\ - cn.stylefeng.roses.kernel.auth.starter.GunsPasswordRsaPropAutoConfiguration \ No newline at end of file + cn.stylefeng.roses.kernel.auth.starter.AuthAutoConfiguration,\ + cn.stylefeng.roses.kernel.auth.starter.SsoAutoConfiguration,\ + cn.stylefeng.roses.kernel.auth.starter.cache.AuthTokenMemoryCacheAutoConfiguration,\ + cn.stylefeng.roses.kernel.auth.starter.cache.AuthTokenRedisCacheAutoConfiguration,\ + cn.stylefeng.roses.kernel.auth.starter.PasswordRsaPropAutoConfiguration \ No newline at end of file