mirror of https://gitee.com/stylefeng/roses
【7.6.0】【框架改造】更新auth模块的自动配置名称
parent
4a50b5e35b
commit
97f64aba83
|
@ -55,7 +55,7 @@ import java.util.Set;
|
||||||
* @since 2020/11/30 22:16
|
* @since 2020/11/30 22:16
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
public class GunsAuthAutoConfiguration {
|
public class AuthAutoConfiguration {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private PwdRsaSecretProperties pwdRsaSecretProperties;
|
private PwdRsaSecretProperties pwdRsaSecretProperties;
|
|
@ -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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -37,7 +37,7 @@ import org.springframework.context.annotation.Configuration;
|
||||||
* @since 2022/10/16 15:33
|
* @since 2022/10/16 15:33
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
public class GunsPasswordRsaPropAutoConfiguration {
|
public class PasswordRsaPropAutoConfiguration {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 密码加密传输的配置,RSA加密密钥对
|
* 密码加密传输的配置,RSA加密密钥对
|
|
@ -37,7 +37,7 @@ import org.springframework.context.annotation.Configuration;
|
||||||
* @since 2021/5/25 22:29
|
* @since 2021/5/25 22:29
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
public class GunsSsoAutoConfiguration {
|
public class SsoAutoConfiguration {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单点的开关配置
|
* 单点的开关配置
|
|
@ -51,7 +51,7 @@ import static cn.stylefeng.roses.kernel.cache.api.constants.CacheConstants.NONE_
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
@ConditionalOnMissingClass("org.springframework.data.redis.connection.RedisConnectionFactory")
|
@ConditionalOnMissingClass("org.springframework.data.redis.connection.RedisConnectionFactory")
|
||||||
public class GunsAuthTokenMemoryCacheAutoConfiguration {
|
public class AuthTokenMemoryCacheAutoConfiguration {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录用户的缓存,默认使用内存方式
|
* 登录用户的缓存,默认使用内存方式
|
|
@ -48,7 +48,7 @@ import java.util.Set;
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
@ConditionalOnClass(name = "org.springframework.data.redis.connection.RedisConnectionFactory")
|
@ConditionalOnClass(name = "org.springframework.data.redis.connection.RedisConnectionFactory")
|
||||||
public class GunsAuthTokenRedisCacheAutoConfiguration {
|
public class AuthTokenRedisCacheAutoConfiguration {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录用户的缓存,默认使用内存方式
|
* 登录用户的缓存,默认使用内存方式
|
|
@ -1,6 +1,6 @@
|
||||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||||
cn.stylefeng.roses.kernel.auth.starter.GunsAuthAutoConfiguration,\
|
cn.stylefeng.roses.kernel.auth.starter.AuthAutoConfiguration,\
|
||||||
cn.stylefeng.roses.kernel.auth.starter.GunsSsoAutoConfiguration,\
|
cn.stylefeng.roses.kernel.auth.starter.SsoAutoConfiguration,\
|
||||||
cn.stylefeng.roses.kernel.auth.starter.cache.GunsAuthTokenMemoryCacheAutoConfiguration,\
|
cn.stylefeng.roses.kernel.auth.starter.cache.AuthTokenMemoryCacheAutoConfiguration,\
|
||||||
cn.stylefeng.roses.kernel.auth.starter.cache.GunsAuthTokenRedisCacheAutoConfiguration,\
|
cn.stylefeng.roses.kernel.auth.starter.cache.AuthTokenRedisCacheAutoConfiguration,\
|
||||||
cn.stylefeng.roses.kernel.auth.starter.GunsPasswordRsaPropAutoConfiguration
|
cn.stylefeng.roses.kernel.auth.starter.PasswordRsaPropAutoConfiguration
|
Loading…
Reference in New Issue