mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-07 01:18:27 +08:00
@Bean public to default
This commit is contained in:
parent
b7b0cd21c6
commit
b6f9828ff7
@ -40,7 +40,7 @@ public class MvcCurrentUserAutoConfiguration implements WebMvcConfigurer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public CurrentUserMethodArgumentResolver currentUserMethodArgumentResolver() {
|
CurrentUserMethodArgumentResolver currentUserMethodArgumentResolver() {
|
||||||
return new CurrentUserMethodArgumentResolver();
|
return new CurrentUserMethodArgumentResolver();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -37,13 +37,13 @@ public class SessionAutoConfiguration {
|
|||||||
|
|
||||||
|
|
||||||
@Bean(name = "savedRequestSuccessHandler")
|
@Bean(name = "savedRequestSuccessHandler")
|
||||||
public SavedRequestAwareAuthenticationSuccessHandler
|
SavedRequestAwareAuthenticationSuccessHandler
|
||||||
savedRequestAwareAuthenticationSuccessHandler() {
|
savedRequestAwareAuthenticationSuccessHandler() {
|
||||||
return new SavedRequestAwareAuthenticationSuccessHandler();
|
return new SavedRequestAwareAuthenticationSuccessHandler();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public SessionManager sessionManager(
|
SessionManager sessionManager(
|
||||||
@Value("${maxkey.server.persistence}") int persistence,
|
@Value("${maxkey.server.persistence}") int persistence,
|
||||||
JdbcTemplate jdbcTemplate,
|
JdbcTemplate jdbcTemplate,
|
||||||
RedisConnectionFactory redisConnFactory,
|
RedisConnectionFactory redisConnFactory,
|
||||||
@ -55,7 +55,7 @@ public class SessionAutoConfiguration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public HttpSessionListenerAdapter httpSessionListenerAdapter() {
|
HttpSessionListenerAdapter httpSessionListenerAdapter() {
|
||||||
return new HttpSessionListenerAdapter();
|
return new HttpSessionListenerAdapter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,7 @@ public class TokenAutoConfiguration{
|
|||||||
LoggerFactory.getLogger(TokenAutoConfiguration.class);
|
LoggerFactory.getLogger(TokenAutoConfiguration.class);
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public AuthTokenService authTokenService(
|
AuthTokenService authTokenService(
|
||||||
AuthJwkConfig authJwkConfig,
|
AuthJwkConfig authJwkConfig,
|
||||||
RedisConnectionFactory redisConnFactory,
|
RedisConnectionFactory redisConnFactory,
|
||||||
MomentaryService momentaryService,
|
MomentaryService momentaryService,
|
||||||
@ -63,7 +63,7 @@ public class TokenAutoConfiguration{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public AuthRefreshTokenService refreshTokenService(AuthJwkConfig authJwkConfig) throws JOSEException {
|
AuthRefreshTokenService refreshTokenService(AuthJwkConfig authJwkConfig) throws JOSEException {
|
||||||
return new AuthRefreshTokenService(authJwkConfig);
|
return new AuthRefreshTokenService(authJwkConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,6 @@ import org.dromara.maxkey.authn.session.SessionManager;
|
|||||||
import org.dromara.maxkey.constants.ConstsLoginType;
|
import org.dromara.maxkey.constants.ConstsLoginType;
|
||||||
import org.dromara.maxkey.crypto.password.PasswordReciprocal;
|
import org.dromara.maxkey.crypto.password.PasswordReciprocal;
|
||||||
import org.dromara.maxkey.entity.idm.UserInfo;
|
import org.dromara.maxkey.entity.idm.UserInfo;
|
||||||
;
|
|
||||||
import org.dromara.maxkey.web.WebConstants;
|
import org.dromara.maxkey.web.WebConstants;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|||||||
@ -47,7 +47,7 @@ public class AuthnProviderAutoConfiguration {
|
|||||||
static final Logger _logger = LoggerFactory.getLogger(AuthnProviderAutoConfiguration.class);
|
static final Logger _logger = LoggerFactory.getLogger(AuthnProviderAutoConfiguration.class);
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public AbstractAuthenticationProvider authenticationProvider(
|
AbstractAuthenticationProvider authenticationProvider(
|
||||||
NormalAuthenticationProvider normalAuthenticationProvider,
|
NormalAuthenticationProvider normalAuthenticationProvider,
|
||||||
MobileAuthenticationProvider mobileAuthenticationProvider,
|
MobileAuthenticationProvider mobileAuthenticationProvider,
|
||||||
TrustedAuthenticationProvider trustedAuthenticationProvider,
|
TrustedAuthenticationProvider trustedAuthenticationProvider,
|
||||||
@ -63,7 +63,7 @@ public class AuthnProviderAutoConfiguration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public NormalAuthenticationProvider normalAuthenticationProvider(
|
NormalAuthenticationProvider normalAuthenticationProvider(
|
||||||
AbstractAuthenticationRealm authenticationRealm,
|
AbstractAuthenticationRealm authenticationRealm,
|
||||||
ApplicationConfig applicationConfig,
|
ApplicationConfig applicationConfig,
|
||||||
SessionManager sessionManager,
|
SessionManager sessionManager,
|
||||||
|
|||||||
@ -42,7 +42,7 @@ public class JwtAuthnAutoConfiguration {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
public JWKSetKeyStore jwtLoginJwkSetKeyStore() {
|
JWKSetKeyStore jwtLoginJwkSetKeyStore() {
|
||||||
JWKSetKeyStore jwkSetKeyStore = new JWKSetKeyStore();
|
JWKSetKeyStore jwkSetKeyStore = new JWKSetKeyStore();
|
||||||
ClassPathResource classPathResource = new ClassPathResource("/config/loginjwkkeystore.jwks");
|
ClassPathResource classPathResource = new ClassPathResource("/config/loginjwkkeystore.jwks");
|
||||||
jwkSetKeyStore.setLocation(classPathResource);
|
jwkSetKeyStore.setLocation(classPathResource);
|
||||||
@ -58,7 +58,7 @@ public class JwtAuthnAutoConfiguration {
|
|||||||
* @throws NoSuchAlgorithmException
|
* @throws NoSuchAlgorithmException
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
public DefaultJwtSigningAndValidationService jwtLoginValidationService(
|
DefaultJwtSigningAndValidationService jwtLoginValidationService(
|
||||||
@Qualifier("jwtLoginJwkSetKeyStore") JWKSetKeyStore jwtLoginJwkSetKeyStore)
|
@Qualifier("jwtLoginJwkSetKeyStore") JWKSetKeyStore jwtLoginJwkSetKeyStore)
|
||||||
throws NoSuchAlgorithmException, InvalidKeySpecException, JOSEException {
|
throws NoSuchAlgorithmException, InvalidKeySpecException, JOSEException {
|
||||||
DefaultJwtSigningAndValidationService jwtSignerValidationService =
|
DefaultJwtSigningAndValidationService jwtSignerValidationService =
|
||||||
@ -74,7 +74,7 @@ public class JwtAuthnAutoConfiguration {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
public JwtLoginService jwtLoginService(
|
JwtLoginService jwtLoginService(
|
||||||
@Value("${maxkey.login.jwt.issuer}")
|
@Value("${maxkey.login.jwt.issuer}")
|
||||||
String issuer,
|
String issuer,
|
||||||
@Qualifier("jwtLoginValidationService")
|
@Qualifier("jwtLoginValidationService")
|
||||||
|
|||||||
@ -45,7 +45,7 @@ public class CasAutoConfiguration implements InitializingBean {
|
|||||||
* @return casTicketServices
|
* @return casTicketServices
|
||||||
*/
|
*/
|
||||||
@Bean(name = "casTicketServices")
|
@Bean(name = "casTicketServices")
|
||||||
public TicketServices casTicketServices(
|
TicketServices casTicketServices(
|
||||||
@Value("${maxkey.server.persistence}") int persistence,
|
@Value("${maxkey.server.persistence}") int persistence,
|
||||||
@Value("${maxkey.login.remeberme.validity}") int validity,
|
@Value("${maxkey.login.remeberme.validity}") int validity,
|
||||||
JdbcTemplate jdbcTemplate,
|
JdbcTemplate jdbcTemplate,
|
||||||
@ -61,7 +61,7 @@ public class CasAutoConfiguration implements InitializingBean {
|
|||||||
* @return casTicketServices
|
* @return casTicketServices
|
||||||
*/
|
*/
|
||||||
@Bean(name = "casTicketGrantingTicketServices")
|
@Bean(name = "casTicketGrantingTicketServices")
|
||||||
public TicketServices casTicketGrantingTicketServices(
|
TicketServices casTicketGrantingTicketServices(
|
||||||
@Value("${maxkey.server.persistence}") int persistence,
|
@Value("${maxkey.server.persistence}") int persistence,
|
||||||
@Value("${maxkey.login.remeberme.validity}") int validity,
|
@Value("${maxkey.login.remeberme.validity}") int validity,
|
||||||
JdbcTemplate jdbcTemplate,
|
JdbcTemplate jdbcTemplate,
|
||||||
@ -71,7 +71,7 @@ public class CasAutoConfiguration implements InitializingBean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean(name = "casProxyGrantingTicketServices")
|
@Bean(name = "casProxyGrantingTicketServices")
|
||||||
public TicketServices casProxyGrantingTicketServices(
|
TicketServices casProxyGrantingTicketServices(
|
||||||
@Value("${maxkey.server.persistence}") int persistence,
|
@Value("${maxkey.server.persistence}") int persistence,
|
||||||
@Value("${maxkey.login.remeberme.validity}") int validity,
|
@Value("${maxkey.login.remeberme.validity}") int validity,
|
||||||
JdbcTemplate jdbcTemplate,
|
JdbcTemplate jdbcTemplate,
|
||||||
|
|||||||
@ -76,7 +76,7 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
|||||||
private static final Logger _logger = LoggerFactory.getLogger(Oauth20AutoConfiguration.class);
|
private static final Logger _logger = LoggerFactory.getLogger(Oauth20AutoConfiguration.class);
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public FilterRegistrationBean<Filter> tokenEndpointAuthenticationFilter() {
|
FilterRegistrationBean<Filter> tokenEndpointAuthenticationFilter() {
|
||||||
_logger.debug("TokenEndpointAuthenticationFilter init ");
|
_logger.debug("TokenEndpointAuthenticationFilter init ");
|
||||||
FilterRegistrationBean<Filter> registration = new FilterRegistrationBean<>();
|
FilterRegistrationBean<Filter> registration = new FilterRegistrationBean<>();
|
||||||
registration.setFilter(new TokenEndpointAuthenticationFilter());
|
registration.setFilter(new TokenEndpointAuthenticationFilter());
|
||||||
@ -94,7 +94,7 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
|||||||
* http://openid.net/specs/openid-connect-core-1_0.html#SelfIssued
|
* http://openid.net/specs/openid-connect-core-1_0.html#SelfIssued
|
||||||
*/
|
*/
|
||||||
@Bean(name = "oidcProviderMetadata")
|
@Bean(name = "oidcProviderMetadata")
|
||||||
public OIDCProviderMetadataDetails oidcProviderMetadata(
|
OIDCProviderMetadataDetails oidcProviderMetadata(
|
||||||
@Value("${maxkey.oidc.metadata.issuer}")
|
@Value("${maxkey.oidc.metadata.issuer}")
|
||||||
String issuer,
|
String issuer,
|
||||||
@Value("${maxkey.oidc.metadata.authorizationEndpoint}")
|
@Value("${maxkey.oidc.metadata.authorizationEndpoint}")
|
||||||
@ -117,7 +117,7 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Bean(name = "jwkSetKeyStore")
|
@Bean(name = "jwkSetKeyStore")
|
||||||
public JWKSetKeyStore jwkSetKeyStore() {
|
JWKSetKeyStore jwkSetKeyStore() {
|
||||||
JWKSetKeyStore jwkSetKeyStore = new JWKSetKeyStore();
|
JWKSetKeyStore jwkSetKeyStore = new JWKSetKeyStore();
|
||||||
ClassPathResource classPathResource = new ClassPathResource("/config/keystore.jwks");
|
ClassPathResource classPathResource = new ClassPathResource("/config/keystore.jwks");
|
||||||
jwkSetKeyStore.setLocation(classPathResource);
|
jwkSetKeyStore.setLocation(classPathResource);
|
||||||
@ -133,7 +133,7 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
|||||||
* @throws NoSuchAlgorithmException
|
* @throws NoSuchAlgorithmException
|
||||||
*/
|
*/
|
||||||
@Bean(name = "jwtSignerValidationService")
|
@Bean(name = "jwtSignerValidationService")
|
||||||
public DefaultJwtSigningAndValidationService jwtSignerValidationService(
|
DefaultJwtSigningAndValidationService jwtSignerValidationService(
|
||||||
@Qualifier("jwkSetKeyStore")
|
@Qualifier("jwkSetKeyStore")
|
||||||
JWKSetKeyStore jwkSetKeyStore)
|
JWKSetKeyStore jwkSetKeyStore)
|
||||||
throws NoSuchAlgorithmException, InvalidKeySpecException, JOSEException {
|
throws NoSuchAlgorithmException, InvalidKeySpecException, JOSEException {
|
||||||
@ -153,7 +153,7 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
|||||||
* @throws NoSuchAlgorithmException
|
* @throws NoSuchAlgorithmException
|
||||||
*/
|
*/
|
||||||
@Bean(name = "jwtEncryptionService")
|
@Bean(name = "jwtEncryptionService")
|
||||||
public DefaultJwtEncryptionAndDecryptionService jwtEncryptionService(
|
DefaultJwtEncryptionAndDecryptionService jwtEncryptionService(
|
||||||
@Qualifier("jwkSetKeyStore")
|
@Qualifier("jwkSetKeyStore")
|
||||||
JWKSetKeyStore jwkSetKeyStore)
|
JWKSetKeyStore jwkSetKeyStore)
|
||||||
throws NoSuchAlgorithmException, InvalidKeySpecException, JOSEException {
|
throws NoSuchAlgorithmException, InvalidKeySpecException, JOSEException {
|
||||||
@ -171,7 +171,7 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Bean(name = "tokenEnhancer")
|
@Bean(name = "tokenEnhancer")
|
||||||
public OIDCIdTokenEnhancer tokenEnhancer(
|
OIDCIdTokenEnhancer tokenEnhancer(
|
||||||
OIDCProviderMetadataDetails oidcProviderMetadata,
|
OIDCProviderMetadataDetails oidcProviderMetadata,
|
||||||
ClientDetailsService oauth20JdbcClientDetailsService) {
|
ClientDetailsService oauth20JdbcClientDetailsService) {
|
||||||
OIDCIdTokenEnhancer tokenEnhancer = new OIDCIdTokenEnhancer();
|
OIDCIdTokenEnhancer tokenEnhancer = new OIDCIdTokenEnhancer();
|
||||||
@ -180,6 +180,7 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
|||||||
_logger.debug("OIDC IdToken Enhancer init.");
|
_logger.debug("OIDC IdToken Enhancer init.");
|
||||||
return tokenEnhancer;
|
return tokenEnhancer;
|
||||||
}
|
}
|
||||||
|
|
||||||
//以上部分为了支持OpenID Connect 1.0
|
//以上部分为了支持OpenID Connect 1.0
|
||||||
|
|
||||||
|
|
||||||
@ -189,7 +190,7 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
|||||||
* @return oauth20AuthorizationCodeServices
|
* @return oauth20AuthorizationCodeServices
|
||||||
*/
|
*/
|
||||||
@Bean(name = "oauth20AuthorizationCodeServices")
|
@Bean(name = "oauth20AuthorizationCodeServices")
|
||||||
public AuthorizationCodeServices oauth20AuthorizationCodeServices(
|
AuthorizationCodeServices oauth20AuthorizationCodeServices(
|
||||||
@Value("${maxkey.server.persistence}") int persistence,
|
@Value("${maxkey.server.persistence}") int persistence,
|
||||||
JdbcTemplate jdbcTemplate,
|
JdbcTemplate jdbcTemplate,
|
||||||
RedisConnectionFactory redisConnFactory) {
|
RedisConnectionFactory redisConnFactory) {
|
||||||
@ -203,7 +204,7 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
|||||||
* @return oauth20TokenStore
|
* @return oauth20TokenStore
|
||||||
*/
|
*/
|
||||||
@Bean(name = "oauth20TokenStore")
|
@Bean(name = "oauth20TokenStore")
|
||||||
public TokenStore oauth20TokenStore(
|
TokenStore oauth20TokenStore(
|
||||||
@Value("${maxkey.server.persistence}") int persistence,
|
@Value("${maxkey.server.persistence}") int persistence,
|
||||||
JdbcTemplate jdbcTemplate,
|
JdbcTemplate jdbcTemplate,
|
||||||
RedisConnectionFactory redisConnFactory) {
|
RedisConnectionFactory redisConnFactory) {
|
||||||
@ -216,7 +217,7 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
|||||||
* @return converter
|
* @return converter
|
||||||
*/
|
*/
|
||||||
@Bean(name = "converter")
|
@Bean(name = "converter")
|
||||||
public JwtAccessTokenConverter jwtAccessTokenConverter() {
|
JwtAccessTokenConverter jwtAccessTokenConverter() {
|
||||||
JwtAccessTokenConverter jwtAccessTokenConverter = new JwtAccessTokenConverter();
|
JwtAccessTokenConverter jwtAccessTokenConverter = new JwtAccessTokenConverter();
|
||||||
_logger.debug("OAuth 2 Jwt AccessToken Converter init.");
|
_logger.debug("OAuth 2 Jwt AccessToken Converter init.");
|
||||||
return jwtAccessTokenConverter;
|
return jwtAccessTokenConverter;
|
||||||
@ -227,7 +228,7 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
|||||||
* @return oauth20JdbcClientDetailsService
|
* @return oauth20JdbcClientDetailsService
|
||||||
*/
|
*/
|
||||||
@Bean(name = "oauth20JdbcClientDetailsService")
|
@Bean(name = "oauth20JdbcClientDetailsService")
|
||||||
public JdbcClientDetailsService jdbcClientDetailsService(DataSource dataSource,@Qualifier("passwordReciprocal") PasswordEncoder passwordReciprocal) {
|
JdbcClientDetailsService jdbcClientDetailsService(DataSource dataSource, @Qualifier("passwordReciprocal") PasswordEncoder passwordReciprocal) {
|
||||||
JdbcClientDetailsService clientDetailsService = new JdbcClientDetailsService(dataSource);
|
JdbcClientDetailsService clientDetailsService = new JdbcClientDetailsService(dataSource);
|
||||||
//clientDetailsService.setPasswordEncoder(passwordReciprocal);
|
//clientDetailsService.setPasswordEncoder(passwordReciprocal);
|
||||||
_logger.debug("OAuth 2 Jdbc ClientDetails Service init.");
|
_logger.debug("OAuth 2 Jdbc ClientDetails Service init.");
|
||||||
@ -239,7 +240,7 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
|||||||
* @return oauth20TokenServices
|
* @return oauth20TokenServices
|
||||||
*/
|
*/
|
||||||
@Bean(name = "oauth20TokenServices")
|
@Bean(name = "oauth20TokenServices")
|
||||||
public DefaultTokenServices defaultTokenServices(
|
DefaultTokenServices defaultTokenServices(
|
||||||
JdbcClientDetailsService oauth20JdbcClientDetailsService,
|
JdbcClientDetailsService oauth20JdbcClientDetailsService,
|
||||||
TokenStore oauth20TokenStore,
|
TokenStore oauth20TokenStore,
|
||||||
OIDCIdTokenEnhancer tokenEnhancer) {
|
OIDCIdTokenEnhancer tokenEnhancer) {
|
||||||
@ -258,7 +259,7 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
|||||||
* @return oauth20ApprovalStore
|
* @return oauth20ApprovalStore
|
||||||
*/
|
*/
|
||||||
@Bean(name = "oauth20ApprovalStore")
|
@Bean(name = "oauth20ApprovalStore")
|
||||||
public TokenApprovalStore tokenApprovalStore(
|
TokenApprovalStore tokenApprovalStore(
|
||||||
TokenStore oauth20TokenStore) {
|
TokenStore oauth20TokenStore) {
|
||||||
TokenApprovalStore tokenApprovalStore = new TokenApprovalStore();
|
TokenApprovalStore tokenApprovalStore = new TokenApprovalStore();
|
||||||
tokenApprovalStore.setTokenStore(oauth20TokenStore);
|
tokenApprovalStore.setTokenStore(oauth20TokenStore);
|
||||||
@ -272,7 +273,7 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
|||||||
* @return oAuth2RequestFactory
|
* @return oAuth2RequestFactory
|
||||||
*/
|
*/
|
||||||
@Bean(name = "oAuth2RequestFactory")
|
@Bean(name = "oAuth2RequestFactory")
|
||||||
public DefaultOAuth2RequestFactory oauth2RequestFactory(
|
DefaultOAuth2RequestFactory oauth2RequestFactory(
|
||||||
JdbcClientDetailsService oauth20JdbcClientDetailsService) {
|
JdbcClientDetailsService oauth20JdbcClientDetailsService) {
|
||||||
DefaultOAuth2RequestFactory oauth2RequestFactory =
|
DefaultOAuth2RequestFactory oauth2RequestFactory =
|
||||||
new DefaultOAuth2RequestFactory(oauth20JdbcClientDetailsService);
|
new DefaultOAuth2RequestFactory(oauth20JdbcClientDetailsService);
|
||||||
@ -285,7 +286,7 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
|||||||
* @return oauth20UserApprovalHandler
|
* @return oauth20UserApprovalHandler
|
||||||
*/
|
*/
|
||||||
@Bean(name = "oauth20UserApprovalHandler")
|
@Bean(name = "oauth20UserApprovalHandler")
|
||||||
public OAuth20UserApprovalHandler oauth20UserApprovalHandler(
|
OAuth20UserApprovalHandler oauth20UserApprovalHandler(
|
||||||
JdbcClientDetailsService oauth20JdbcClientDetailsService,
|
JdbcClientDetailsService oauth20JdbcClientDetailsService,
|
||||||
DefaultOAuth2RequestFactory oAuth2RequestFactory,
|
DefaultOAuth2RequestFactory oAuth2RequestFactory,
|
||||||
TokenApprovalStore oauth20ApprovalStore
|
TokenApprovalStore oauth20ApprovalStore
|
||||||
@ -303,7 +304,7 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
|||||||
* @return oauth20UserAuthenticationManager
|
* @return oauth20UserAuthenticationManager
|
||||||
*/
|
*/
|
||||||
@Bean(name = "oauth20UserAuthenticationManager")
|
@Bean(name = "oauth20UserAuthenticationManager")
|
||||||
public ProviderManager oauth20UserAuthenticationManager(
|
ProviderManager oauth20UserAuthenticationManager(
|
||||||
@Qualifier("passwordEncoder")
|
@Qualifier("passwordEncoder")
|
||||||
PasswordEncoder passwordEncoder,
|
PasswordEncoder passwordEncoder,
|
||||||
LoginRepository loginRepository
|
LoginRepository loginRepository
|
||||||
@ -325,7 +326,7 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
|||||||
* @return oauth20ClientAuthenticationManager
|
* @return oauth20ClientAuthenticationManager
|
||||||
*/
|
*/
|
||||||
@Bean(name = "oauth20ClientAuthenticationManager")
|
@Bean(name = "oauth20ClientAuthenticationManager")
|
||||||
public ProviderManager oauth20ClientAuthenticationManager(
|
ProviderManager oauth20ClientAuthenticationManager(
|
||||||
JdbcClientDetailsService oauth20JdbcClientDetailsService,
|
JdbcClientDetailsService oauth20JdbcClientDetailsService,
|
||||||
@Qualifier("passwordReciprocal")
|
@Qualifier("passwordReciprocal")
|
||||||
PasswordEncoder passwordReciprocal
|
PasswordEncoder passwordReciprocal
|
||||||
|
|||||||
@ -67,7 +67,7 @@ public class Saml20AutoConfiguration implements InitializingBean {
|
|||||||
* @throws ConfigurationException
|
* @throws ConfigurationException
|
||||||
*/
|
*/
|
||||||
@Bean(name = "samlBootstrapInitializer")
|
@Bean(name = "samlBootstrapInitializer")
|
||||||
public String samlBootstrapInitializer() throws ConfigurationException {
|
String samlBootstrapInitializer() throws ConfigurationException {
|
||||||
org.opensaml.DefaultBootstrap.bootstrap();
|
org.opensaml.DefaultBootstrap.bootstrap();
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@ -77,7 +77,7 @@ public class Saml20AutoConfiguration implements InitializingBean {
|
|||||||
* @return timeService
|
* @return timeService
|
||||||
*/
|
*/
|
||||||
@Bean(name = "timeService")
|
@Bean(name = "timeService")
|
||||||
public TimeService TimeService() {
|
TimeService TimeService() {
|
||||||
TimeService timeService = new TimeService();
|
TimeService timeService = new TimeService();
|
||||||
return timeService;
|
return timeService;
|
||||||
}
|
}
|
||||||
@ -87,7 +87,7 @@ public class Saml20AutoConfiguration implements InitializingBean {
|
|||||||
* @return idService
|
* @return idService
|
||||||
*/
|
*/
|
||||||
@Bean(name = "idService")
|
@Bean(name = "idService")
|
||||||
public IDService idService() {
|
IDService idService() {
|
||||||
IDService idService = new IDService();
|
IDService idService = new IDService();
|
||||||
return idService;
|
return idService;
|
||||||
}
|
}
|
||||||
@ -97,7 +97,7 @@ public class Saml20AutoConfiguration implements InitializingBean {
|
|||||||
* @return endpointGenerator
|
* @return endpointGenerator
|
||||||
*/
|
*/
|
||||||
@Bean(name = "endpointGenerator")
|
@Bean(name = "endpointGenerator")
|
||||||
public EndpointGenerator endpointGenerator() {
|
EndpointGenerator endpointGenerator() {
|
||||||
EndpointGenerator generator = new EndpointGenerator();
|
EndpointGenerator generator = new EndpointGenerator();
|
||||||
return generator;
|
return generator;
|
||||||
}
|
}
|
||||||
@ -107,7 +107,7 @@ public class Saml20AutoConfiguration implements InitializingBean {
|
|||||||
* @return authnResponseGenerator
|
* @return authnResponseGenerator
|
||||||
*/
|
*/
|
||||||
@Bean(name = "authnResponseGenerator")
|
@Bean(name = "authnResponseGenerator")
|
||||||
public AuthnResponseGenerator authnResponseGenerator(TimeService timeService,IDService idService,
|
AuthnResponseGenerator authnResponseGenerator(TimeService timeService, IDService idService,
|
||||||
@Value("${maxkey.saml.v20.idp.issuer}") String issuerEntityName) {
|
@Value("${maxkey.saml.v20.idp.issuer}") String issuerEntityName) {
|
||||||
_logger.debug("issuerEntityName {}" , issuerEntityName);
|
_logger.debug("issuerEntityName {}" , issuerEntityName);
|
||||||
AuthnResponseGenerator generator = new AuthnResponseGenerator(issuerEntityName,timeService,idService);
|
AuthnResponseGenerator generator = new AuthnResponseGenerator(issuerEntityName,timeService,idService);
|
||||||
@ -119,7 +119,7 @@ public class Saml20AutoConfiguration implements InitializingBean {
|
|||||||
* @return issuerEntityName
|
* @return issuerEntityName
|
||||||
*/
|
*/
|
||||||
@Bean(name = "issuerEntityName")
|
@Bean(name = "issuerEntityName")
|
||||||
public String issuerEntityName(
|
String issuerEntityName(
|
||||||
@Value("${maxkey.saml.v20.idp.issuer}") String issuerEntityName) {
|
@Value("${maxkey.saml.v20.idp.issuer}") String issuerEntityName) {
|
||||||
return issuerEntityName;
|
return issuerEntityName;
|
||||||
}
|
}
|
||||||
@ -129,7 +129,7 @@ public class Saml20AutoConfiguration implements InitializingBean {
|
|||||||
* @return saml20Metadata
|
* @return saml20Metadata
|
||||||
*/
|
*/
|
||||||
@Bean(name = "saml20Metadata")
|
@Bean(name = "saml20Metadata")
|
||||||
public Saml20Metadata saml20Metadata(
|
Saml20Metadata saml20Metadata(
|
||||||
@Value("${maxkey.saml.v20.metadata.orgName}") String orgName,
|
@Value("${maxkey.saml.v20.metadata.orgName}") String orgName,
|
||||||
@Value("${maxkey.saml.v20.metadata.orgDisplayName}") String orgDisplayName,
|
@Value("${maxkey.saml.v20.metadata.orgDisplayName}") String orgDisplayName,
|
||||||
@Value("${maxkey.saml.v20.metadata.orgURL}") String orgURL,
|
@Value("${maxkey.saml.v20.metadata.orgURL}") String orgURL,
|
||||||
@ -157,7 +157,7 @@ public class Saml20AutoConfiguration implements InitializingBean {
|
|||||||
* @return samlValidaotrSuite
|
* @return samlValidaotrSuite
|
||||||
*/
|
*/
|
||||||
@Bean(name = "samlValidaotrSuite")
|
@Bean(name = "samlValidaotrSuite")
|
||||||
public SAML2ValidatorSuite validatorSuite() {
|
SAML2ValidatorSuite validatorSuite() {
|
||||||
SAML2ValidatorSuite validatorSuite = new SAML2ValidatorSuite();
|
SAML2ValidatorSuite validatorSuite = new SAML2ValidatorSuite();
|
||||||
return validatorSuite;
|
return validatorSuite;
|
||||||
}
|
}
|
||||||
@ -168,7 +168,7 @@ public class Saml20AutoConfiguration implements InitializingBean {
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
@Bean(name = "mapBasedStorageService")
|
@Bean(name = "mapBasedStorageService")
|
||||||
public MapBasedStorageService mapBasedStorageService() {
|
MapBasedStorageService mapBasedStorageService() {
|
||||||
MapBasedStorageService mapBasedStorageService = new MapBasedStorageService();
|
MapBasedStorageService mapBasedStorageService = new MapBasedStorageService();
|
||||||
return mapBasedStorageService;
|
return mapBasedStorageService;
|
||||||
}
|
}
|
||||||
@ -181,7 +181,7 @@ public class Saml20AutoConfiguration implements InitializingBean {
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings({"deprecation"})
|
@SuppressWarnings({"deprecation"})
|
||||||
@Bean(name = "velocityEngine")
|
@Bean(name = "velocityEngine")
|
||||||
public VelocityEngine velocityEngine() throws VelocityException, IOException {
|
VelocityEngine velocityEngine() throws VelocityException, IOException {
|
||||||
VelocityEngineFactoryBean factory = new VelocityEngineFactoryBean();
|
VelocityEngineFactoryBean factory = new VelocityEngineFactoryBean();
|
||||||
factory.setPreferFileSystemAccess(false);
|
factory.setPreferFileSystemAccess(false);
|
||||||
Properties velocityProperties = new Properties();
|
Properties velocityProperties = new Properties();
|
||||||
@ -197,7 +197,7 @@ public class Saml20AutoConfiguration implements InitializingBean {
|
|||||||
* @return replayCache
|
* @return replayCache
|
||||||
*/
|
*/
|
||||||
@Bean(name = "replayCache")
|
@Bean(name = "replayCache")
|
||||||
public ReplayCache replayCache(MapBasedStorageService<String, ReplayCacheEntry> mapBasedStorageService,
|
ReplayCache replayCache(MapBasedStorageService<String, ReplayCacheEntry> mapBasedStorageService,
|
||||||
@Value("${maxkey.saml.v20.replay.cache.life.in.millis}") long duration) {
|
@Value("${maxkey.saml.v20.replay.cache.life.in.millis}") long duration) {
|
||||||
ReplayCache replayCache = new ReplayCache(mapBasedStorageService,duration);
|
ReplayCache replayCache = new ReplayCache(mapBasedStorageService,duration);
|
||||||
return replayCache;
|
return replayCache;
|
||||||
@ -208,7 +208,7 @@ public class Saml20AutoConfiguration implements InitializingBean {
|
|||||||
* @return messageReplayRule
|
* @return messageReplayRule
|
||||||
*/
|
*/
|
||||||
@Bean(name = "messageReplayRule")
|
@Bean(name = "messageReplayRule")
|
||||||
public MessageReplayRule messageReplayRule(ReplayCache replayCache) {
|
MessageReplayRule messageReplayRule(ReplayCache replayCache) {
|
||||||
MessageReplayRule messageReplayRule = new MessageReplayRule(replayCache);
|
MessageReplayRule messageReplayRule = new MessageReplayRule(replayCache);
|
||||||
return messageReplayRule;
|
return messageReplayRule;
|
||||||
}
|
}
|
||||||
@ -218,7 +218,7 @@ public class Saml20AutoConfiguration implements InitializingBean {
|
|||||||
* @return samlParserPool
|
* @return samlParserPool
|
||||||
*/
|
*/
|
||||||
@Bean(name = "samlParserPool")
|
@Bean(name = "samlParserPool")
|
||||||
public BasicParserPool samlParserPool(
|
BasicParserPool samlParserPool(
|
||||||
@Value("${maxkey.saml.v20.max.parser.pool.size}") int maxPoolSize) {
|
@Value("${maxkey.saml.v20.max.parser.pool.size}") int maxPoolSize) {
|
||||||
BasicParserPool samlParserPool = new BasicParserPool();
|
BasicParserPool samlParserPool = new BasicParserPool();
|
||||||
samlParserPool.setMaxPoolSize(maxPoolSize);
|
samlParserPool.setMaxPoolSize(maxPoolSize);
|
||||||
@ -230,7 +230,7 @@ public class Saml20AutoConfiguration implements InitializingBean {
|
|||||||
* @return issueInstantRule
|
* @return issueInstantRule
|
||||||
*/
|
*/
|
||||||
@Bean(name = "issueInstantRule")
|
@Bean(name = "issueInstantRule")
|
||||||
public IssueInstantRule issueInstantRule(
|
IssueInstantRule issueInstantRule(
|
||||||
@Value("${maxkey.saml.v20.issue.instant.check.clock.skew.in.seconds}") int newClockSkew,
|
@Value("${maxkey.saml.v20.issue.instant.check.clock.skew.in.seconds}") int newClockSkew,
|
||||||
@Value("${maxkey.saml.v20.issue.instant.check.validity.time.in.seconds}") int newExpires) {
|
@Value("${maxkey.saml.v20.issue.instant.check.validity.time.in.seconds}") int newExpires) {
|
||||||
IssueInstantRule decoder = new IssueInstantRule(newClockSkew,newExpires);
|
IssueInstantRule decoder = new IssueInstantRule(newClockSkew,newExpires);
|
||||||
@ -243,7 +243,7 @@ public class Saml20AutoConfiguration implements InitializingBean {
|
|||||||
* @return openHTTPPostSimpleSignDecoder
|
* @return openHTTPPostSimpleSignDecoder
|
||||||
*/
|
*/
|
||||||
@Bean(name = "openHTTPPostSimpleSignDecoder")
|
@Bean(name = "openHTTPPostSimpleSignDecoder")
|
||||||
public OpenHTTPPostSimpleSignDecoder openHTTPPostSimpleSignDecoder(BasicParserPool samlParserPool,
|
OpenHTTPPostSimpleSignDecoder openHTTPPostSimpleSignDecoder(BasicParserPool samlParserPool,
|
||||||
@Value("${maxkey.saml.v20.idp.receiver.endpoint}") String receiverEndpoint) {
|
@Value("${maxkey.saml.v20.idp.receiver.endpoint}") String receiverEndpoint) {
|
||||||
OpenHTTPPostSimpleSignDecoder decoder = new OpenHTTPPostSimpleSignDecoder(samlParserPool);
|
OpenHTTPPostSimpleSignDecoder decoder = new OpenHTTPPostSimpleSignDecoder(samlParserPool);
|
||||||
decoder.setReceiverEndpoint(receiverEndpoint);
|
decoder.setReceiverEndpoint(receiverEndpoint);
|
||||||
@ -255,7 +255,7 @@ public class Saml20AutoConfiguration implements InitializingBean {
|
|||||||
* @return openHTTPPostDecoder
|
* @return openHTTPPostDecoder
|
||||||
*/
|
*/
|
||||||
@Bean(name = "openHTTPPostDecoder")
|
@Bean(name = "openHTTPPostDecoder")
|
||||||
public OpenHTTPPostDecoder openHTTPPostDecoder(BasicParserPool samlParserPool,
|
OpenHTTPPostDecoder openHTTPPostDecoder(BasicParserPool samlParserPool,
|
||||||
@Value("${maxkey.saml.v20.idp.receiver.endpoint}") String receiverEndpoint) {
|
@Value("${maxkey.saml.v20.idp.receiver.endpoint}") String receiverEndpoint) {
|
||||||
OpenHTTPPostDecoder decoder = new OpenHTTPPostDecoder(samlParserPool);
|
OpenHTTPPostDecoder decoder = new OpenHTTPPostDecoder(samlParserPool);
|
||||||
decoder.setReceiverEndpoint(receiverEndpoint);
|
decoder.setReceiverEndpoint(receiverEndpoint);
|
||||||
@ -267,7 +267,7 @@ public class Saml20AutoConfiguration implements InitializingBean {
|
|||||||
* @return openHTTPRedirectDecoder
|
* @return openHTTPRedirectDecoder
|
||||||
*/
|
*/
|
||||||
@Bean(name = "openHTTPRedirectDecoder")
|
@Bean(name = "openHTTPRedirectDecoder")
|
||||||
public OpenHTTPRedirectDecoder openHTTPRedirectDecoder(BasicParserPool samlParserPool,
|
OpenHTTPRedirectDecoder openHTTPRedirectDecoder(BasicParserPool samlParserPool,
|
||||||
@Value("${maxkey.saml.v20.idp.receiver.endpoint}") String receiverEndpoint) {
|
@Value("${maxkey.saml.v20.idp.receiver.endpoint}") String receiverEndpoint) {
|
||||||
OpenHTTPRedirectDecoder decoder = new OpenHTTPRedirectDecoder(samlParserPool);
|
OpenHTTPRedirectDecoder decoder = new OpenHTTPRedirectDecoder(samlParserPool);
|
||||||
decoder.setReceiverEndpoint(receiverEndpoint);
|
decoder.setReceiverEndpoint(receiverEndpoint);
|
||||||
@ -279,7 +279,7 @@ public class Saml20AutoConfiguration implements InitializingBean {
|
|||||||
* @return extractPostBindingAdapter
|
* @return extractPostBindingAdapter
|
||||||
*/
|
*/
|
||||||
@Bean(name = "extractPostBindingAdapter")
|
@Bean(name = "extractPostBindingAdapter")
|
||||||
public ExtractPostBindingAdapter extractPostBindingAdapter(OpenHTTPPostDecoder openHTTPPostDecoder,
|
ExtractPostBindingAdapter extractPostBindingAdapter(OpenHTTPPostDecoder openHTTPPostDecoder,
|
||||||
@Qualifier("keyStoreLoader") KeyStoreLoader keyStoreLoader, IssueInstantRule issueInstantRule, MessageReplayRule messageReplayRule) {
|
@Qualifier("keyStoreLoader") KeyStoreLoader keyStoreLoader, IssueInstantRule issueInstantRule, MessageReplayRule messageReplayRule) {
|
||||||
ExtractPostBindingAdapter adapter = new ExtractPostBindingAdapter(openHTTPPostDecoder);
|
ExtractPostBindingAdapter adapter = new ExtractPostBindingAdapter(openHTTPPostDecoder);
|
||||||
adapter.setIssueInstantRule(issueInstantRule);
|
adapter.setIssueInstantRule(issueInstantRule);
|
||||||
@ -293,7 +293,7 @@ public class Saml20AutoConfiguration implements InitializingBean {
|
|||||||
* @return extractRedirectBindingAdapter
|
* @return extractRedirectBindingAdapter
|
||||||
*/
|
*/
|
||||||
@Bean(name = "extractRedirectBindingAdapter")
|
@Bean(name = "extractRedirectBindingAdapter")
|
||||||
public ExtractRedirectBindingAdapter extractRedirectBindingAdapter(OpenHTTPRedirectDecoder openHTTPRedirectDecoder,
|
ExtractRedirectBindingAdapter extractRedirectBindingAdapter(OpenHTTPRedirectDecoder openHTTPRedirectDecoder,
|
||||||
@Qualifier("keyStoreLoader") KeyStoreLoader keyStoreLoader, IssueInstantRule issueInstantRule, MessageReplayRule messageReplayRule) {
|
@Qualifier("keyStoreLoader") KeyStoreLoader keyStoreLoader, IssueInstantRule issueInstantRule, MessageReplayRule messageReplayRule) {
|
||||||
ExtractRedirectBindingAdapter adapter = new ExtractRedirectBindingAdapter(openHTTPRedirectDecoder);
|
ExtractRedirectBindingAdapter adapter = new ExtractRedirectBindingAdapter(openHTTPRedirectDecoder);
|
||||||
adapter.setIssueInstantRule(issueInstantRule);
|
adapter.setIssueInstantRule(issueInstantRule);
|
||||||
@ -308,7 +308,7 @@ public class Saml20AutoConfiguration implements InitializingBean {
|
|||||||
* @return postSimpleSignBindingAdapter
|
* @return postSimpleSignBindingAdapter
|
||||||
*/
|
*/
|
||||||
@Bean(name = "postSimpleSignBindingAdapter")
|
@Bean(name = "postSimpleSignBindingAdapter")
|
||||||
public PostSimpleSignBindingAdapter postSimpleSignBindingAdapter(VelocityEngine velocityEngine,
|
PostSimpleSignBindingAdapter postSimpleSignBindingAdapter(VelocityEngine velocityEngine,
|
||||||
@Value("${maxkey.saml.v20.idp.issuer}") String issuerEntityName) {
|
@Value("${maxkey.saml.v20.idp.issuer}") String issuerEntityName) {
|
||||||
PostSimpleSignBindingAdapter adapter = new PostSimpleSignBindingAdapter();
|
PostSimpleSignBindingAdapter adapter = new PostSimpleSignBindingAdapter();
|
||||||
adapter.setVelocityEngine(velocityEngine);
|
adapter.setVelocityEngine(velocityEngine);
|
||||||
@ -321,7 +321,7 @@ public class Saml20AutoConfiguration implements InitializingBean {
|
|||||||
* @return postBindingAdapter
|
* @return postBindingAdapter
|
||||||
*/
|
*/
|
||||||
@Bean(name = "postBindingAdapter")
|
@Bean(name = "postBindingAdapter")
|
||||||
public PostBindingAdapter postBindingAdapter(VelocityEngine velocityEngine,
|
PostBindingAdapter postBindingAdapter(VelocityEngine velocityEngine,
|
||||||
@Value("${maxkey.saml.v20.idp.issuer}") String issuerEntityName) {
|
@Value("${maxkey.saml.v20.idp.issuer}") String issuerEntityName) {
|
||||||
PostBindingAdapter adapter = new PostBindingAdapter();
|
PostBindingAdapter adapter = new PostBindingAdapter();
|
||||||
adapter.setVelocityEngine(velocityEngine);
|
adapter.setVelocityEngine(velocityEngine);
|
||||||
|
|||||||
@ -121,7 +121,7 @@ public class IpLocationAutoConfiguration {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
public IpLocationParser ipLocationParser(
|
IpLocationParser ipLocationParser(
|
||||||
@Value("${maxkey.login.iplocation:true}") boolean isIplocation,
|
@Value("${maxkey.login.iplocation:true}") boolean isIplocation,
|
||||||
@Value("${maxkey.login.iplocation.online.provider:none}") String onlineProvider,
|
@Value("${maxkey.login.iplocation.online.provider:none}") String onlineProvider,
|
||||||
@Value("${maxkey.login.iplocation.offline.provider:Ip2Region}") String offlineProvider) throws Exception {
|
@Value("${maxkey.login.iplocation.offline.provider:Ip2Region}") String offlineProvider) throws Exception {
|
||||||
|
|||||||
@ -36,7 +36,7 @@ public class OneTimePasswordAutoConfiguration {
|
|||||||
|
|
||||||
|
|
||||||
@Bean(name = "mailOtpAuthnService")
|
@Bean(name = "mailOtpAuthnService")
|
||||||
public MailOtpAuthnService mailOtpAuthnService(
|
MailOtpAuthnService mailOtpAuthnService(
|
||||||
@Value("${maxkey.server.persistence}") int persistence,
|
@Value("${maxkey.server.persistence}") int persistence,
|
||||||
CnfEmailSendersService emailSendersService,
|
CnfEmailSendersService emailSendersService,
|
||||||
RedisConnectionFactory redisConnFactory) {
|
RedisConnectionFactory redisConnFactory) {
|
||||||
|
|||||||
@ -36,7 +36,7 @@ public class SmsAutoConfiguration {
|
|||||||
|
|
||||||
|
|
||||||
@Bean(name = "smsOtpAuthnService")
|
@Bean(name = "smsOtpAuthnService")
|
||||||
public SmsOtpAuthnService smsOtpAuthnService(
|
SmsOtpAuthnService smsOtpAuthnService(
|
||||||
@Value("${maxkey.server.persistence}") int persistence,
|
@Value("${maxkey.server.persistence}") int persistence,
|
||||||
CnfSmsProviderService smsProviderService,
|
CnfSmsProviderService smsProviderService,
|
||||||
CnfEmailSendersService emailSendersService,
|
CnfEmailSendersService emailSendersService,
|
||||||
|
|||||||
@ -58,17 +58,17 @@ public class ApplicationAutoConfiguration {
|
|||||||
static final Logger _logger = LoggerFactory.getLogger(ApplicationAutoConfiguration.class);
|
static final Logger _logger = LoggerFactory.getLogger(ApplicationAutoConfiguration.class);
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public PasswordReciprocal passwordReciprocal() {
|
PasswordReciprocal passwordReciprocal() {
|
||||||
return new PasswordReciprocal();
|
return new PasswordReciprocal();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public DataSourceTransactionManager transactionManager(DataSource dataSource) {
|
DataSourceTransactionManager transactionManager(DataSource dataSource) {
|
||||||
return new DataSourceTransactionManager(dataSource);
|
return new DataSourceTransactionManager(dataSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public InstitutionsRepository institutionsRepository(JdbcTemplate jdbcTemplate) {
|
InstitutionsRepository institutionsRepository(JdbcTemplate jdbcTemplate) {
|
||||||
return new InstitutionsRepository(jdbcTemplate);
|
return new InstitutionsRepository(jdbcTemplate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ public class ApplicationAutoConfiguration {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
public PasswordEncoder passwordEncoder(
|
PasswordEncoder passwordEncoder(
|
||||||
@Value("${maxkey.crypto.password.encoder:bcrypt}") String idForEncode) {
|
@Value("${maxkey.crypto.password.encoder:bcrypt}") String idForEncode) {
|
||||||
Map<String ,PasswordEncoder > encoders = new HashMap<>();
|
Map<String ,PasswordEncoder > encoders = new HashMap<>();
|
||||||
encoders.put("bcrypt", new BCryptPasswordEncoder());
|
encoders.put("bcrypt", new BCryptPasswordEncoder());
|
||||||
@ -117,7 +117,7 @@ public class ApplicationAutoConfiguration {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
public KeyStoreLoader keyStoreLoader(
|
KeyStoreLoader keyStoreLoader(
|
||||||
@Value("${maxkey.saml.v20.idp.issuing.entity.id}") String entityName,
|
@Value("${maxkey.saml.v20.idp.issuing.entity.id}") String entityName,
|
||||||
@Value("${maxkey.saml.v20.idp.keystore.password}") String keystorePassword,
|
@Value("${maxkey.saml.v20.idp.keystore.password}") String keystorePassword,
|
||||||
@Value("${maxkey.saml.v20.idp.keystore}") Resource keystoreFile) {
|
@Value("${maxkey.saml.v20.idp.keystore}") Resource keystoreFile) {
|
||||||
@ -133,7 +133,7 @@ public class ApplicationAutoConfiguration {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
public KeyStoreLoader serviceProviderKeyStoreLoader(
|
KeyStoreLoader serviceProviderKeyStoreLoader(
|
||||||
@Value("${maxkey.saml.v20.sp.issuing.entity.id}") String entityName,
|
@Value("${maxkey.saml.v20.sp.issuing.entity.id}") String entityName,
|
||||||
@Value("${maxkey.saml.v20.sp.keystore.password}") String keystorePassword,
|
@Value("${maxkey.saml.v20.sp.keystore.password}") String keystorePassword,
|
||||||
@Value("${maxkey.saml.v20.sp.keystore}") Resource keystoreFile) {
|
@Value("${maxkey.saml.v20.sp.keystore}") Resource keystoreFile) {
|
||||||
@ -149,7 +149,7 @@ public class ApplicationAutoConfiguration {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
public String spIssuingEntityName(
|
String spIssuingEntityName(
|
||||||
@Value("${maxkey.saml.v20.sp.issuing.entity.id}") String spIssuingEntityName) {
|
@Value("${maxkey.saml.v20.sp.issuing.entity.id}") String spIssuingEntityName) {
|
||||||
return spIssuingEntityName;
|
return spIssuingEntityName;
|
||||||
}
|
}
|
||||||
@ -159,7 +159,7 @@ public class ApplicationAutoConfiguration {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
public IdGenerator idGenerator(
|
IdGenerator idGenerator(
|
||||||
@Value("${maxkey.id.strategy:SnowFlake}") String strategy,
|
@Value("${maxkey.id.strategy:SnowFlake}") String strategy,
|
||||||
@Value("${maxkey.id.datacenterId:0}") int datacenterId,
|
@Value("${maxkey.id.datacenterId:0}") int datacenterId,
|
||||||
@Value("${maxkey.id.machineId:0}") int machineId) {
|
@Value("${maxkey.id.machineId:0}") int machineId) {
|
||||||
@ -172,7 +172,7 @@ public class ApplicationAutoConfiguration {
|
|||||||
|
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public MomentaryService momentaryService(
|
MomentaryService momentaryService(
|
||||||
RedisConnectionFactory redisConnFactory,
|
RedisConnectionFactory redisConnFactory,
|
||||||
@Value("${maxkey.server.persistence}") int persistence) {
|
@Value("${maxkey.server.persistence}") int persistence) {
|
||||||
MomentaryService momentaryService;
|
MomentaryService momentaryService;
|
||||||
|
|||||||
@ -80,7 +80,7 @@ public class MvcAutoConfiguration implements WebMvcConfigurer {
|
|||||||
* @return messageSource
|
* @return messageSource
|
||||||
*/
|
*/
|
||||||
@Bean(name = "messageSource")
|
@Bean(name = "messageSource")
|
||||||
public ReloadableResourceBundleMessageSource reloadableResourceBundleMessageSource(
|
ReloadableResourceBundleMessageSource reloadableResourceBundleMessageSource(
|
||||||
@Value("${spring.messages.basename:classpath:messages/message}")
|
@Value("${spring.messages.basename:classpath:messages/message}")
|
||||||
String messagesBasename) {
|
String messagesBasename) {
|
||||||
_logger.debug("Basename {}" , messagesBasename);
|
_logger.debug("Basename {}" , messagesBasename);
|
||||||
@ -98,7 +98,7 @@ public class MvcAutoConfiguration implements WebMvcConfigurer {
|
|||||||
*/
|
*/
|
||||||
//@Primary
|
//@Primary
|
||||||
@Bean(name = "localeChangeInterceptor")
|
@Bean(name = "localeChangeInterceptor")
|
||||||
public LocaleChangeInterceptor localeChangeInterceptor() {
|
LocaleChangeInterceptor localeChangeInterceptor() {
|
||||||
LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
|
LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
|
||||||
localeChangeInterceptor.setParamName("language");
|
localeChangeInterceptor.setParamName("language");
|
||||||
return localeChangeInterceptor;
|
return localeChangeInterceptor;
|
||||||
@ -109,7 +109,7 @@ public class MvcAutoConfiguration implements WebMvcConfigurer {
|
|||||||
* @return handlerMapping
|
* @return handlerMapping
|
||||||
*/
|
*/
|
||||||
@Bean(name = "handlerMapping")
|
@Bean(name = "handlerMapping")
|
||||||
public RequestMappingHandlerMapping requestMappingHandlerMapping(
|
RequestMappingHandlerMapping requestMappingHandlerMapping(
|
||||||
LocaleChangeInterceptor localeChangeInterceptor) {
|
LocaleChangeInterceptor localeChangeInterceptor) {
|
||||||
RequestMappingHandlerMapping requestMappingHandlerMapping = new RequestMappingHandlerMapping();
|
RequestMappingHandlerMapping requestMappingHandlerMapping = new RequestMappingHandlerMapping();
|
||||||
requestMappingHandlerMapping.setInterceptors(localeChangeInterceptor);
|
requestMappingHandlerMapping.setInterceptors(localeChangeInterceptor);
|
||||||
@ -121,7 +121,7 @@ public class MvcAutoConfiguration implements WebMvcConfigurer {
|
|||||||
* @return jaxb2Marshaller
|
* @return jaxb2Marshaller
|
||||||
*/
|
*/
|
||||||
@Bean(name = "jaxb2Marshaller")
|
@Bean(name = "jaxb2Marshaller")
|
||||||
public Jaxb2Marshaller jaxb2Marshaller() {
|
Jaxb2Marshaller jaxb2Marshaller() {
|
||||||
Jaxb2Marshaller jaxb2Marshaller = new Jaxb2Marshaller();
|
Jaxb2Marshaller jaxb2Marshaller = new Jaxb2Marshaller();
|
||||||
jaxb2Marshaller.setClassesToBeBound(org.dromara.maxkey.entity.xml.UserInfoXML.class);;
|
jaxb2Marshaller.setClassesToBeBound(org.dromara.maxkey.entity.xml.UserInfoXML.class);;
|
||||||
return jaxb2Marshaller;
|
return jaxb2Marshaller;
|
||||||
@ -132,7 +132,7 @@ public class MvcAutoConfiguration implements WebMvcConfigurer {
|
|||||||
* @return marshallingHttpMessageConverter
|
* @return marshallingHttpMessageConverter
|
||||||
*/
|
*/
|
||||||
@Bean(name = "marshallingHttpMessageConverter")
|
@Bean(name = "marshallingHttpMessageConverter")
|
||||||
public MarshallingHttpMessageConverter marshallingHttpMessageConverter(
|
MarshallingHttpMessageConverter marshallingHttpMessageConverter(
|
||||||
Jaxb2Marshaller jaxb2Marshaller) {
|
Jaxb2Marshaller jaxb2Marshaller) {
|
||||||
MarshallingHttpMessageConverter marshallingHttpMessageConverter = new MarshallingHttpMessageConverter();
|
MarshallingHttpMessageConverter marshallingHttpMessageConverter = new MarshallingHttpMessageConverter();
|
||||||
marshallingHttpMessageConverter.setMarshaller(jaxb2Marshaller);
|
marshallingHttpMessageConverter.setMarshaller(jaxb2Marshaller);
|
||||||
@ -151,7 +151,7 @@ public class MvcAutoConfiguration implements WebMvcConfigurer {
|
|||||||
* @return mappingJacksonHttpMessageConverter
|
* @return mappingJacksonHttpMessageConverter
|
||||||
*/
|
*/
|
||||||
@Bean(name = "mappingJacksonHttpMessageConverter")
|
@Bean(name = "mappingJacksonHttpMessageConverter")
|
||||||
public MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter() {
|
MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter() {
|
||||||
MappingJackson2HttpMessageConverter mappingJacksonHttpMessageConverter = new MappingJackson2HttpMessageConverter();
|
MappingJackson2HttpMessageConverter mappingJacksonHttpMessageConverter = new MappingJackson2HttpMessageConverter();
|
||||||
ArrayList<MediaType> mediaTypesList = new ArrayList<>();
|
ArrayList<MediaType> mediaTypesList = new ArrayList<>();
|
||||||
mediaTypesList.add(MediaType.APPLICATION_JSON);
|
mediaTypesList.add(MediaType.APPLICATION_JSON);
|
||||||
@ -176,7 +176,7 @@ public class MvcAutoConfiguration implements WebMvcConfigurer {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@Bean(name = "cookieLocaleResolver")
|
@Bean(name = "cookieLocaleResolver")
|
||||||
public LocaleResolver cookieLocaleResolver(
|
LocaleResolver cookieLocaleResolver(
|
||||||
@Value("${maxkey.server.domain:maxkey.top}")
|
@Value("${maxkey.server.domain:maxkey.top}")
|
||||||
String domainName
|
String domainName
|
||||||
) {
|
) {
|
||||||
@ -193,7 +193,7 @@ public class MvcAutoConfiguration implements WebMvcConfigurer {
|
|||||||
* @return requestMappingHandlerAdapter
|
* @return requestMappingHandlerAdapter
|
||||||
*/
|
*/
|
||||||
@Bean(name = "addConverterRequestMappingHandlerAdapter")
|
@Bean(name = "addConverterRequestMappingHandlerAdapter")
|
||||||
public RequestMappingHandlerAdapter requestMappingHandlerAdapter(
|
RequestMappingHandlerAdapter requestMappingHandlerAdapter(
|
||||||
@Qualifier("mappingJacksonHttpMessageConverter")
|
@Qualifier("mappingJacksonHttpMessageConverter")
|
||||||
MappingJackson2HttpMessageConverter mappingJacksonHttpMessageConverter,
|
MappingJackson2HttpMessageConverter mappingJacksonHttpMessageConverter,
|
||||||
MarshallingHttpMessageConverter marshallingHttpMessageConverter,
|
MarshallingHttpMessageConverter marshallingHttpMessageConverter,
|
||||||
@ -218,7 +218,7 @@ public class MvcAutoConfiguration implements WebMvcConfigurer {
|
|||||||
* @return restTemplate
|
* @return restTemplate
|
||||||
*/
|
*/
|
||||||
@Bean(name = "restTemplate")
|
@Bean(name = "restTemplate")
|
||||||
public RestTemplate restTemplate(
|
RestTemplate restTemplate(
|
||||||
@Qualifier("mappingJacksonHttpMessageConverter")
|
@Qualifier("mappingJacksonHttpMessageConverter")
|
||||||
MappingJackson2HttpMessageConverter mappingJacksonHttpMessageConverter,
|
MappingJackson2HttpMessageConverter mappingJacksonHttpMessageConverter,
|
||||||
MarshallingHttpMessageConverter marshallingHttpMessageConverter) {
|
MarshallingHttpMessageConverter marshallingHttpMessageConverter) {
|
||||||
@ -236,7 +236,7 @@ public class MvcAutoConfiguration implements WebMvcConfigurer {
|
|||||||
* @return webServerFactoryCustomizer
|
* @return webServerFactoryCustomizer
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
public WebServerFactoryCustomizer<ConfigurableWebServerFactory> webServerFactoryCustomizer() {
|
WebServerFactoryCustomizer<ConfigurableWebServerFactory> webServerFactoryCustomizer() {
|
||||||
return new WebServerFactoryCustomizer<ConfigurableWebServerFactory>() {
|
return new WebServerFactoryCustomizer<ConfigurableWebServerFactory>() {
|
||||||
@Override
|
@Override
|
||||||
public void customize(ConfigurableWebServerFactory factory) {
|
public void customize(ConfigurableWebServerFactory factory) {
|
||||||
@ -253,13 +253,13 @@ public class MvcAutoConfiguration implements WebMvcConfigurer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public SecurityContextHolderAwareRequestFilter securityContextHolderAwareRequestFilter() {
|
SecurityContextHolderAwareRequestFilter securityContextHolderAwareRequestFilter() {
|
||||||
_logger.debug("securityContextHolderAwareRequestFilter init ");
|
_logger.debug("securityContextHolderAwareRequestFilter init ");
|
||||||
return new SecurityContextHolderAwareRequestFilter();
|
return new SecurityContextHolderAwareRequestFilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public FilterRegistrationBean<CorsFilter> corsFilter() {
|
FilterRegistrationBean<CorsFilter> corsFilter() {
|
||||||
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
|
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
|
||||||
CorsConfiguration corsConfiguration = new CorsConfiguration();
|
CorsConfiguration corsConfiguration = new CorsConfiguration();
|
||||||
corsConfiguration.setAllowCredentials(true);
|
corsConfiguration.setAllowCredentials(true);
|
||||||
@ -275,7 +275,7 @@ public class MvcAutoConfiguration implements WebMvcConfigurer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public FilterRegistrationBean<Filter> delegatingFilterProxy() {
|
FilterRegistrationBean<Filter> delegatingFilterProxy() {
|
||||||
_logger.debug("delegatingFilterProxy init for /* ");
|
_logger.debug("delegatingFilterProxy init for /* ");
|
||||||
FilterRegistrationBean<Filter> registrationBean = new FilterRegistrationBean<>();
|
FilterRegistrationBean<Filter> registrationBean = new FilterRegistrationBean<>();
|
||||||
registrationBean.setFilter(new DelegatingFilterProxy("securityContextHolderAwareRequestFilter"));
|
registrationBean.setFilter(new DelegatingFilterProxy("securityContextHolderAwareRequestFilter"));
|
||||||
@ -288,7 +288,7 @@ public class MvcAutoConfiguration implements WebMvcConfigurer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public FilterRegistrationBean<Filter> webXssRequestFilter() {
|
FilterRegistrationBean<Filter> webXssRequestFilter() {
|
||||||
_logger.debug("webXssRequestFilter init for /* ");
|
_logger.debug("webXssRequestFilter init for /* ");
|
||||||
FilterRegistrationBean<Filter> registrationBean = new FilterRegistrationBean<>(new WebXssRequestFilter());
|
FilterRegistrationBean<Filter> registrationBean = new FilterRegistrationBean<>(new WebXssRequestFilter());
|
||||||
registrationBean.addUrlPatterns("/*");
|
registrationBean.addUrlPatterns("/*");
|
||||||
@ -298,7 +298,7 @@ public class MvcAutoConfiguration implements WebMvcConfigurer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public FilterRegistrationBean<Filter> webInstRequestFilter(
|
FilterRegistrationBean<Filter> webInstRequestFilter(
|
||||||
InstitutionsRepository institutionsRepository,
|
InstitutionsRepository institutionsRepository,
|
||||||
ApplicationConfig applicationConfig) {
|
ApplicationConfig applicationConfig) {
|
||||||
_logger.debug("WebInstRequestFilter init for /* ");
|
_logger.debug("WebInstRequestFilter init for /* ");
|
||||||
|
|||||||
@ -42,7 +42,7 @@ public class RedisAutoConfiguration {
|
|||||||
* @return RedisConnectionFactory
|
* @return RedisConnectionFactory
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
public RedisConnectionFactory redisConnFactory(
|
RedisConnectionFactory redisConnFactory(
|
||||||
@Value("${spring.redis.host}")
|
@Value("${spring.redis.host}")
|
||||||
String host,
|
String host,
|
||||||
@Value("${spring.redis.port:6379}")
|
@Value("${spring.redis.port:6379}")
|
||||||
|
|||||||
@ -33,7 +33,7 @@ public class SwaggerAutoConfiguration {
|
|||||||
boolean enable;
|
boolean enable;
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public GlobalOpenApiCustomizer orderGlobalOpenApiCustomizer() {
|
GlobalOpenApiCustomizer orderGlobalOpenApiCustomizer() {
|
||||||
return openApi -> {
|
return openApi -> {
|
||||||
if (openApi.getTags()!=null){
|
if (openApi.getTags()!=null){
|
||||||
openApi.getTags().forEach(tag -> {
|
openApi.getTags().forEach(tag -> {
|
||||||
@ -51,7 +51,7 @@ public class SwaggerAutoConfiguration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public GroupedOpenApi userApi(){
|
GroupedOpenApi userApi(){
|
||||||
String[] paths = {
|
String[] paths = {
|
||||||
"/login",
|
"/login",
|
||||||
"/logout",
|
"/logout",
|
||||||
@ -72,7 +72,7 @@ public class SwaggerAutoConfiguration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public OpenAPI docOpenAPI() {
|
OpenAPI docOpenAPI() {
|
||||||
return new OpenAPI()
|
return new OpenAPI()
|
||||||
.info(
|
.info(
|
||||||
new Info()
|
new Info()
|
||||||
|
|||||||
@ -49,7 +49,7 @@ public class SynchronizerAutoConfiguration implements InitializingBean {
|
|||||||
public static final String SYNCHRONIZERS_SELECT_STATEMENT = "select * from mxk_synchronizers where status ='1'";
|
public static final String SYNCHRONIZERS_SELECT_STATEMENT = "select * from mxk_synchronizers where status ='1'";
|
||||||
|
|
||||||
@Bean(name = "schedulerSynchronizerJobs")
|
@Bean(name = "schedulerSynchronizerJobs")
|
||||||
public String schedulerSynchronizerJobs(
|
String schedulerSynchronizerJobs(
|
||||||
JdbcTemplate jdbcTemplate,
|
JdbcTemplate jdbcTemplate,
|
||||||
SchedulerFactoryBean schedulerFactoryBean,
|
SchedulerFactoryBean schedulerFactoryBean,
|
||||||
@Value("${maxkey.job.cron.enable}") boolean jobCronEnable
|
@Value("${maxkey.job.cron.enable}") boolean jobCronEnable
|
||||||
|
|||||||
@ -79,7 +79,7 @@ public class MaxKeyConfig {
|
|||||||
|
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public OtpKeyUriFormat otpKeyUriFormat(
|
OtpKeyUriFormat otpKeyUriFormat(
|
||||||
@Value("${maxkey.otp.policy.type:totp}")
|
@Value("${maxkey.otp.policy.type:totp}")
|
||||||
String type,
|
String type,
|
||||||
@Value("${maxkey.otp.policy.domain:MaxKey.top}")
|
@Value("${maxkey.otp.policy.domain:MaxKey.top}")
|
||||||
@ -98,7 +98,7 @@ public class MaxKeyConfig {
|
|||||||
|
|
||||||
//可以在此实现其他的登陆认证方式,请实现AbstractAuthenticationRealm
|
//可以在此实现其他的登陆认证方式,请实现AbstractAuthenticationRealm
|
||||||
@Bean
|
@Bean
|
||||||
public JdbcAuthenticationRealm authenticationRealm(
|
JdbcAuthenticationRealm authenticationRealm(
|
||||||
@Qualifier("passwordEncoder") PasswordEncoder passwordEncoder,
|
@Qualifier("passwordEncoder") PasswordEncoder passwordEncoder,
|
||||||
PasswordPolicyValidator passwordPolicyValidator,
|
PasswordPolicyValidator passwordPolicyValidator,
|
||||||
LoginRepository loginService,
|
LoginRepository loginService,
|
||||||
@ -122,7 +122,7 @@ public class MaxKeyConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public TimeBasedOtpAuthn timeBasedOtpAuthn(
|
TimeBasedOtpAuthn timeBasedOtpAuthn(
|
||||||
@Value("${maxkey.otp.policy.digits:6}")
|
@Value("${maxkey.otp.policy.digits:6}")
|
||||||
int digits,
|
int digits,
|
||||||
@Value("${maxkey.otp.policy.period:30}")
|
@Value("${maxkey.otp.policy.period:30}")
|
||||||
@ -133,7 +133,7 @@ public class MaxKeyConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public AbstractOtpAuthn tfaOtpAuthn(
|
AbstractOtpAuthn tfaOtpAuthn(
|
||||||
@Value("${maxkey.login.mfa.type}") String mfaType,
|
@Value("${maxkey.login.mfa.type}") String mfaType,
|
||||||
@Value("${maxkey.otp.policy.digits:6}")
|
@Value("${maxkey.otp.policy.digits:6}")
|
||||||
int digits,
|
int digits,
|
||||||
@ -154,7 +154,7 @@ public class MaxKeyConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public MailOtpAuthn mailOtpAuthn(
|
MailOtpAuthn mailOtpAuthn(
|
||||||
EmailConfig emailConfig,
|
EmailConfig emailConfig,
|
||||||
@Value("${spring.mail.properties.mailotp.message.subject}")
|
@Value("${spring.mail.properties.mailotp.message.subject}")
|
||||||
String messageSubject,
|
String messageSubject,
|
||||||
@ -187,7 +187,7 @@ public class MaxKeyConfig {
|
|||||||
|
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public RemoteKerberosService kerberosService(
|
RemoteKerberosService kerberosService(
|
||||||
@Value("${maxkey.login.kerberos.default.userdomain}")
|
@Value("${maxkey.login.kerberos.default.userdomain}")
|
||||||
String userDomain,
|
String userDomain,
|
||||||
@Value("${maxkey.login.kerberos.default.fulluserdomain}")
|
@Value("${maxkey.login.kerberos.default.fulluserdomain}")
|
||||||
|
|||||||
@ -39,7 +39,7 @@ public class MaxKeyMgtConfig {
|
|||||||
|
|
||||||
//authenticationRealm for MaxKeyMgtApplication
|
//authenticationRealm for MaxKeyMgtApplication
|
||||||
@Bean
|
@Bean
|
||||||
public JdbcAuthenticationRealm authenticationRealm(
|
JdbcAuthenticationRealm authenticationRealm(
|
||||||
@Qualifier("passwordEncoder")
|
@Qualifier("passwordEncoder")
|
||||||
PasswordEncoder passwordEncoder,
|
PasswordEncoder passwordEncoder,
|
||||||
PasswordPolicyValidator passwordPolicyValidator,
|
PasswordPolicyValidator passwordPolicyValidator,
|
||||||
@ -63,7 +63,7 @@ public class MaxKeyMgtConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public AbstractOtpAuthn timeBasedOtpAuthn() {
|
AbstractOtpAuthn timeBasedOtpAuthn() {
|
||||||
AbstractOtpAuthn tfaOtpAuthn = new TimeBasedOtpAuthn();
|
AbstractOtpAuthn tfaOtpAuthn = new TimeBasedOtpAuthn();
|
||||||
logger.debug("TimeBasedOtpAuthn inited.");
|
logger.debug("TimeBasedOtpAuthn inited.");
|
||||||
return tfaOtpAuthn;
|
return tfaOtpAuthn;
|
||||||
|
|||||||
@ -42,7 +42,7 @@ public class MaxKeyMgtListenerConfig {
|
|||||||
private static final Logger logger = LoggerFactory.getLogger(MaxKeyMgtListenerConfig.class);
|
private static final Logger logger = LoggerFactory.getLogger(MaxKeyMgtListenerConfig.class);
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public String sessionListenerAdapter(
|
String sessionListenerAdapter(
|
||||||
Scheduler scheduler,
|
Scheduler scheduler,
|
||||||
SessionManager sessionManager) throws SchedulerException {
|
SessionManager sessionManager) throws SchedulerException {
|
||||||
new ScheduleAdapterBuilder()
|
new ScheduleAdapterBuilder()
|
||||||
@ -56,7 +56,7 @@ public class MaxKeyMgtListenerConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public String reorgDeptListenerAdapter(
|
String reorgDeptListenerAdapter(
|
||||||
Scheduler scheduler,
|
Scheduler scheduler,
|
||||||
OrganizationsService organizationsService) throws SchedulerException {
|
OrganizationsService organizationsService) throws SchedulerException {
|
||||||
new ScheduleAdapterBuilder()
|
new ScheduleAdapterBuilder()
|
||||||
@ -70,7 +70,7 @@ public class MaxKeyMgtListenerConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public String dynamicGroupsListenerAdapter(
|
String dynamicGroupsListenerAdapter(
|
||||||
Scheduler scheduler,
|
Scheduler scheduler,
|
||||||
GroupsService groupsService,
|
GroupsService groupsService,
|
||||||
@Value("${maxkey.job.cron.schedule}") String cronSchedule
|
@Value("${maxkey.job.cron.schedule}") String cronSchedule
|
||||||
@ -87,7 +87,7 @@ public class MaxKeyMgtListenerConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public String provisioningRunnerThread(
|
String provisioningRunnerThread(
|
||||||
ConnectorsService connectorsService,
|
ConnectorsService connectorsService,
|
||||||
JdbcTemplate jdbcTemplate,
|
JdbcTemplate jdbcTemplate,
|
||||||
ApplicationConfig applicationConfig
|
ApplicationConfig applicationConfig
|
||||||
|
|||||||
@ -47,7 +47,7 @@ public class Oauth20ClientAutoConfiguration {
|
|||||||
private static final Logger logger = LoggerFactory.getLogger(Oauth20ClientAutoConfiguration.class);
|
private static final Logger logger = LoggerFactory.getLogger(Oauth20ClientAutoConfiguration.class);
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public JdbcClientDetailsService oauth20JdbcClientDetailsService(
|
JdbcClientDetailsService oauth20JdbcClientDetailsService(
|
||||||
DataSource dataSource, @Qualifier("passwordReciprocal") PasswordEncoder passwordReciprocal) {
|
DataSource dataSource, @Qualifier("passwordReciprocal") PasswordEncoder passwordReciprocal) {
|
||||||
JdbcClientDetailsService clientDetailsService = new JdbcClientDetailsService(dataSource);
|
JdbcClientDetailsService clientDetailsService = new JdbcClientDetailsService(dataSource);
|
||||||
//clientDetailsService.setPasswordEncoder(passwordReciprocal);
|
//clientDetailsService.setPasswordEncoder(passwordReciprocal);
|
||||||
@ -61,7 +61,7 @@ public class Oauth20ClientAutoConfiguration {
|
|||||||
* @return oauth20TokenStore
|
* @return oauth20TokenStore
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
public TokenStore oauth20TokenStore(
|
TokenStore oauth20TokenStore(
|
||||||
@Value("${maxkey.server.persistence}") int persistence,
|
@Value("${maxkey.server.persistence}") int persistence,
|
||||||
JdbcTemplate jdbcTemplate,
|
JdbcTemplate jdbcTemplate,
|
||||||
RedisConnectionFactory jedisConnectionFactory) {
|
RedisConnectionFactory jedisConnectionFactory) {
|
||||||
@ -82,7 +82,7 @@ public class Oauth20ClientAutoConfiguration {
|
|||||||
* @return oauth20TokenServices
|
* @return oauth20TokenServices
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
public DefaultTokenServices oauth20TokenServices(
|
DefaultTokenServices oauth20TokenServices(
|
||||||
JdbcClientDetailsService oauth20JdbcClientDetailsService,
|
JdbcClientDetailsService oauth20JdbcClientDetailsService,
|
||||||
TokenStore oauth20TokenStore) {
|
TokenStore oauth20TokenStore) {
|
||||||
DefaultTokenServices tokenServices = new DefaultTokenServices();
|
DefaultTokenServices tokenServices = new DefaultTokenServices();
|
||||||
@ -97,7 +97,7 @@ public class Oauth20ClientAutoConfiguration {
|
|||||||
* @return oauth20ClientAuthenticationManager
|
* @return oauth20ClientAuthenticationManager
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
public ProviderManager oauth20ClientAuthenticationManager(
|
ProviderManager oauth20ClientAuthenticationManager(
|
||||||
JdbcClientDetailsService oauth20JdbcClientDetailsService,
|
JdbcClientDetailsService oauth20JdbcClientDetailsService,
|
||||||
@Qualifier("passwordReciprocal")
|
@Qualifier("passwordReciprocal")
|
||||||
PasswordEncoder passwordReciprocal
|
PasswordEncoder passwordReciprocal
|
||||||
|
|||||||
@ -39,7 +39,7 @@ public class MaxKeyOpenApiConfig{
|
|||||||
|
|
||||||
//authenticationRealm for MaxKeyMgtApplication
|
//authenticationRealm for MaxKeyMgtApplication
|
||||||
@Bean
|
@Bean
|
||||||
public JdbcAuthenticationRealm authenticationRealm(
|
JdbcAuthenticationRealm authenticationRealm(
|
||||||
@Qualifier("passwordEncoder")
|
@Qualifier("passwordEncoder")
|
||||||
PasswordEncoder passwordEncoder,
|
PasswordEncoder passwordEncoder,
|
||||||
PasswordPolicyValidator passwordPolicyValidator,
|
PasswordPolicyValidator passwordPolicyValidator,
|
||||||
@ -63,7 +63,7 @@ public class MaxKeyOpenApiConfig{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public AbstractOtpAuthn timeBasedOtpAuthn() {
|
AbstractOtpAuthn timeBasedOtpAuthn() {
|
||||||
AbstractOtpAuthn tfaOtpAuthn = new TimeBasedOtpAuthn();
|
AbstractOtpAuthn tfaOtpAuthn = new TimeBasedOtpAuthn();
|
||||||
logger.debug("TimeBasedOtpAuthn inited.");
|
logger.debug("TimeBasedOtpAuthn inited.");
|
||||||
return tfaOtpAuthn;
|
return tfaOtpAuthn;
|
||||||
|
|||||||
@ -47,7 +47,7 @@ public class Oauth20ClientAutoConfiguration {
|
|||||||
private static final Logger logger = LoggerFactory.getLogger(Oauth20ClientAutoConfiguration.class);
|
private static final Logger logger = LoggerFactory.getLogger(Oauth20ClientAutoConfiguration.class);
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public JdbcClientDetailsService oauth20JdbcClientDetailsService(
|
JdbcClientDetailsService oauth20JdbcClientDetailsService(
|
||||||
DataSource dataSource, @Qualifier("passwordReciprocal") PasswordEncoder passwordReciprocal) {
|
DataSource dataSource, @Qualifier("passwordReciprocal") PasswordEncoder passwordReciprocal) {
|
||||||
JdbcClientDetailsService clientDetailsService = new JdbcClientDetailsService(dataSource);
|
JdbcClientDetailsService clientDetailsService = new JdbcClientDetailsService(dataSource);
|
||||||
//clientDetailsService.setPasswordEncoder(passwordReciprocal);
|
//clientDetailsService.setPasswordEncoder(passwordReciprocal);
|
||||||
@ -61,7 +61,7 @@ public class Oauth20ClientAutoConfiguration {
|
|||||||
* @return oauth20TokenStore
|
* @return oauth20TokenStore
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
public TokenStore oauth20TokenStore(
|
TokenStore oauth20TokenStore(
|
||||||
@Value("${maxkey.server.persistence}") int persistence,
|
@Value("${maxkey.server.persistence}") int persistence,
|
||||||
JdbcTemplate jdbcTemplate,
|
JdbcTemplate jdbcTemplate,
|
||||||
RedisConnectionFactory jedisConnectionFactory) {
|
RedisConnectionFactory jedisConnectionFactory) {
|
||||||
@ -82,7 +82,7 @@ public class Oauth20ClientAutoConfiguration {
|
|||||||
* @return oauth20TokenServices
|
* @return oauth20TokenServices
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
public DefaultTokenServices oauth20TokenServices(
|
DefaultTokenServices oauth20TokenServices(
|
||||||
JdbcClientDetailsService oauth20JdbcClientDetailsService,
|
JdbcClientDetailsService oauth20JdbcClientDetailsService,
|
||||||
TokenStore oauth20TokenStore) {
|
TokenStore oauth20TokenStore) {
|
||||||
DefaultTokenServices tokenServices = new DefaultTokenServices();
|
DefaultTokenServices tokenServices = new DefaultTokenServices();
|
||||||
@ -97,7 +97,7 @@ public class Oauth20ClientAutoConfiguration {
|
|||||||
* @return oauth20ClientAuthenticationManager
|
* @return oauth20ClientAuthenticationManager
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
public ProviderManager oauth20ClientAuthenticationManager(
|
ProviderManager oauth20ClientAuthenticationManager(
|
||||||
JdbcClientDetailsService oauth20JdbcClientDetailsService,
|
JdbcClientDetailsService oauth20JdbcClientDetailsService,
|
||||||
@Qualifier("passwordReciprocal")
|
@Qualifier("passwordReciprocal")
|
||||||
PasswordEncoder passwordReciprocal
|
PasswordEncoder passwordReciprocal
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
echo off
|
echo off
|
||||||
echo set env
|
echo set env
|
||||||
set JAVA_HOME=C:\IDE\jdk-17.0.2.8
|
set JAVA_HOME=C:\ide\jdk-17.0.9+9
|
||||||
set GRADLE_HOME=C:\IDE\gradle-8.8
|
set GRADLE_HOME=C:\ide\gradle-8.8
|
||||||
|
|
||||||
call %JAVA_HOME%/bin/java -version
|
call %JAVA_HOME%/bin/java -version
|
||||||
call %GRADLE_HOME%/bin/gradle -version
|
call %GRADLE_HOME%/bin/gradle -version
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user