mirror of
https://gitee.com/dromara/MaxKey.git
synced 2026-05-14 20:50:14 +08:00
RefreshToken
This commit is contained in:
@@ -62,22 +62,22 @@ public class ApplicationAutoConfiguration implements InitializingBean {
|
||||
private static final Logger _logger =
|
||||
LoggerFactory.getLogger(ApplicationAutoConfiguration.class);
|
||||
|
||||
@Bean(name = "passwordReciprocal")
|
||||
@Bean
|
||||
public PasswordReciprocal passwordReciprocal() {
|
||||
return new PasswordReciprocal();
|
||||
}
|
||||
|
||||
@Bean(name = "transactionManager")
|
||||
@Bean
|
||||
public DataSourceTransactionManager transactionManager(DataSource dataSource) {
|
||||
return new DataSourceTransactionManager(dataSource);
|
||||
}
|
||||
|
||||
@Bean(name = "institutionsRepository")
|
||||
public InstitutionsRepository InstitutionsRepository(JdbcTemplate jdbcTemplate) {
|
||||
@Bean
|
||||
public InstitutionsRepository institutionsRepository(JdbcTemplate jdbcTemplate) {
|
||||
return new InstitutionsRepository(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Bean(name = "localizationRepository")
|
||||
@Bean
|
||||
public LocalizationRepository localizationRepository(JdbcTemplate jdbcTemplate,
|
||||
InstitutionsRepository institutionsRepository) {
|
||||
return new LocalizationRepository(jdbcTemplate,institutionsRepository);
|
||||
@@ -87,7 +87,7 @@ public class ApplicationAutoConfiguration implements InitializingBean {
|
||||
* Authentication Password Encoder .
|
||||
* @return
|
||||
*/
|
||||
@Bean(name = "passwordEncoder")
|
||||
@Bean
|
||||
public PasswordEncoder passwordEncoder() {
|
||||
String idForEncode = "bcrypt";
|
||||
Map<String ,PasswordEncoder > encoders = new HashMap<String ,PasswordEncoder>();
|
||||
@@ -127,7 +127,7 @@ public class ApplicationAutoConfiguration implements InitializingBean {
|
||||
* keyStoreLoader .
|
||||
* @return
|
||||
*/
|
||||
@Bean(name = "keyStoreLoader")
|
||||
@Bean
|
||||
public KeyStoreLoader keyStoreLoader(
|
||||
@Value("${maxkey.saml.v20.idp.issuing.entity.id}") String entityName,
|
||||
@Value("${maxkey.saml.v20.idp.keystore.password}") String keystorePassword,
|
||||
@@ -143,7 +143,7 @@ public class ApplicationAutoConfiguration implements InitializingBean {
|
||||
* spKeyStoreLoader .
|
||||
* @return
|
||||
*/
|
||||
@Bean(name = "spKeyStoreLoader")
|
||||
@Bean
|
||||
public KeyStoreLoader spKeyStoreLoader(
|
||||
@Value("${maxkey.saml.v20.sp.issuing.entity.id}") String entityName,
|
||||
@Value("${maxkey.saml.v20.sp.keystore.password}") String keystorePassword,
|
||||
@@ -159,17 +159,17 @@ public class ApplicationAutoConfiguration implements InitializingBean {
|
||||
* spKeyStoreLoader .
|
||||
* @return
|
||||
*/
|
||||
@Bean(name = "spIssuingEntityName")
|
||||
@Bean
|
||||
public String spIssuingEntityName(
|
||||
@Value("${maxkey.saml.v20.sp.issuing.entity.id}") String spIssuingEntityName) {
|
||||
return spIssuingEntityName;
|
||||
}
|
||||
|
||||
/**
|
||||
* spKeyStoreLoader .
|
||||
* Id Generator .
|
||||
* @return
|
||||
*/
|
||||
@Bean(name = "idGenerator")
|
||||
@Bean
|
||||
public IdGenerator idGenerator(
|
||||
@Value("${maxkey.id.strategy:SnowFlake}") String strategy,
|
||||
@Value("${maxkey.id.datacenterId:0}") int datacenterId,
|
||||
@@ -182,7 +182,7 @@ public class ApplicationAutoConfiguration implements InitializingBean {
|
||||
}
|
||||
|
||||
|
||||
@Bean(name = "momentaryService")
|
||||
@Bean
|
||||
public MomentaryService momentaryService(
|
||||
RedisConnectionFactory redisConnFactory,
|
||||
@Value("${maxkey.server.persistence}") int persistence) throws JOSEException {
|
||||
|
||||
@@ -37,16 +37,7 @@ import org.springframework.stereotype.Component;
|
||||
@Configuration
|
||||
public class ApplicationConfig {
|
||||
|
||||
@Autowired
|
||||
EmailConfig emailConfig;
|
||||
|
||||
@Autowired
|
||||
CharacterEncodingConfig characterEncodingConfig;
|
||||
|
||||
@Autowired
|
||||
LoginConfig loginConfig;
|
||||
|
||||
@Value("${maxkey.server.basedomain}")
|
||||
@Value("${maxkey.server.basedomain}")
|
||||
String baseDomainName;
|
||||
|
||||
@Value("${maxkey.server.domain}")
|
||||
@@ -83,6 +74,17 @@ public class ApplicationConfig {
|
||||
private boolean noticesVisible;
|
||||
|
||||
public static String databaseProduct = "MySQL";
|
||||
|
||||
@Autowired
|
||||
EmailConfig emailConfig;
|
||||
|
||||
@Autowired
|
||||
CharacterEncodingConfig characterEncodingConfig;
|
||||
|
||||
@Autowired
|
||||
LoginConfig loginConfig;
|
||||
|
||||
|
||||
|
||||
|
||||
public int getPort() {
|
||||
|
||||
@@ -25,9 +25,6 @@ import org.springframework.stereotype.Component;
|
||||
@Configuration
|
||||
public class AuthJwkConfig {
|
||||
|
||||
@Value("${maxkey.auth.jwt.issuer:https://sso.maxkey.top/}")
|
||||
String issuer;
|
||||
|
||||
@Value("${maxkey.auth.jwt.expires:86400}")
|
||||
int expires;
|
||||
|
||||
@@ -35,10 +32,13 @@ public class AuthJwkConfig {
|
||||
String secret;
|
||||
|
||||
@Value("${maxkey.session.timeout}")
|
||||
String refreshExpire;
|
||||
int refreshExpires;
|
||||
|
||||
@Value("${maxkey.auth.jwt.refresh.secret}")
|
||||
String refreshSecret;
|
||||
|
||||
@Value("${maxkey.auth.jwt.issuer:https://sso.maxkey.top/}")
|
||||
String issuer;
|
||||
|
||||
public AuthJwkConfig() {
|
||||
super();
|
||||
@@ -52,7 +52,6 @@ public class AuthJwkConfig {
|
||||
this.issuer = issuer;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public int getExpires() {
|
||||
return expires;
|
||||
@@ -69,6 +68,22 @@ public class AuthJwkConfig {
|
||||
public void setSecret(String secret) {
|
||||
this.secret = secret;
|
||||
}
|
||||
|
||||
public int getRefreshExpires() {
|
||||
return refreshExpires;
|
||||
}
|
||||
|
||||
public void setRefreshExpires(int refreshExpires) {
|
||||
this.refreshExpires = refreshExpires;
|
||||
}
|
||||
|
||||
public String getRefreshSecret() {
|
||||
return refreshSecret;
|
||||
}
|
||||
|
||||
public void setRefreshSecret(String refreshSecret) {
|
||||
this.refreshSecret = refreshSecret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
Reference in New Issue
Block a user