@Bean public to default
This commit is contained in:
@@ -37,7 +37,7 @@ import org.springframework.jdbc.core.JdbcTemplate;
|
||||
})
|
||||
public class CasAutoConfiguration implements InitializingBean {
|
||||
private static final Logger _logger = LoggerFactory.getLogger(CasAutoConfiguration.class);
|
||||
|
||||
|
||||
/**
|
||||
* TicketServices.
|
||||
* @param persistence int
|
||||
@@ -45,7 +45,7 @@ public class CasAutoConfiguration implements InitializingBean {
|
||||
* @return casTicketServices
|
||||
*/
|
||||
@Bean(name = "casTicketServices")
|
||||
public TicketServices casTicketServices(
|
||||
TicketServices casTicketServices(
|
||||
@Value("${maxkey.server.persistence}") int persistence,
|
||||
@Value("${maxkey.login.remeberme.validity}") int validity,
|
||||
JdbcTemplate jdbcTemplate,
|
||||
@@ -53,7 +53,7 @@ public class CasAutoConfiguration implements InitializingBean {
|
||||
_logger.debug("init casTicketServices.");
|
||||
return new TicketServicesFactory().getService(persistence, jdbcTemplate, redisConnFactory);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* TicketServices.
|
||||
* @param persistence int
|
||||
@@ -61,7 +61,7 @@ public class CasAutoConfiguration implements InitializingBean {
|
||||
* @return casTicketServices
|
||||
*/
|
||||
@Bean(name = "casTicketGrantingTicketServices")
|
||||
public TicketServices casTicketGrantingTicketServices(
|
||||
TicketServices casTicketGrantingTicketServices(
|
||||
@Value("${maxkey.server.persistence}") int persistence,
|
||||
@Value("${maxkey.login.remeberme.validity}") int validity,
|
||||
JdbcTemplate jdbcTemplate,
|
||||
@@ -69,9 +69,9 @@ public class CasAutoConfiguration implements InitializingBean {
|
||||
_logger.debug("init casTicketGrantingTicketServices.");
|
||||
return new TicketGrantingTicketServicesFactory().getService(persistence, jdbcTemplate, redisConnFactory);
|
||||
}
|
||||
|
||||
|
||||
@Bean(name = "casProxyGrantingTicketServices")
|
||||
public TicketServices casProxyGrantingTicketServices(
|
||||
TicketServices casProxyGrantingTicketServices(
|
||||
@Value("${maxkey.server.persistence}") int persistence,
|
||||
@Value("${maxkey.login.remeberme.validity}") int validity,
|
||||
JdbcTemplate jdbcTemplate,
|
||||
|
||||
@@ -74,9 +74,9 @@ import jakarta.servlet.Filter;
|
||||
})
|
||||
public class Oauth20AutoConfiguration implements InitializingBean {
|
||||
private static final Logger _logger = LoggerFactory.getLogger(Oauth20AutoConfiguration.class);
|
||||
|
||||
|
||||
@Bean
|
||||
public FilterRegistrationBean<Filter> tokenEndpointAuthenticationFilter() {
|
||||
FilterRegistrationBean<Filter> tokenEndpointAuthenticationFilter() {
|
||||
_logger.debug("TokenEndpointAuthenticationFilter init ");
|
||||
FilterRegistrationBean<Filter> registration = new FilterRegistrationBean<>();
|
||||
registration.setFilter(new TokenEndpointAuthenticationFilter());
|
||||
@@ -87,14 +87,14 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
||||
registration.setOrder(1);
|
||||
return registration;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* OIDCProviderMetadataDetails.
|
||||
* Self-issued Provider Metadata
|
||||
* http://openid.net/specs/openid-connect-core-1_0.html#SelfIssued
|
||||
*/
|
||||
@Bean(name = "oidcProviderMetadata")
|
||||
public OIDCProviderMetadataDetails oidcProviderMetadata(
|
||||
OIDCProviderMetadataDetails oidcProviderMetadata(
|
||||
@Value("${maxkey.oidc.metadata.issuer}")
|
||||
String issuer,
|
||||
@Value("${maxkey.oidc.metadata.authorizationEndpoint}")
|
||||
@@ -117,14 +117,14 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
||||
* @return
|
||||
*/
|
||||
@Bean(name = "jwkSetKeyStore")
|
||||
public JWKSetKeyStore jwkSetKeyStore() {
|
||||
JWKSetKeyStore jwkSetKeyStore() {
|
||||
JWKSetKeyStore jwkSetKeyStore = new JWKSetKeyStore();
|
||||
ClassPathResource classPathResource = new ClassPathResource("/config/keystore.jwks");
|
||||
jwkSetKeyStore.setLocation(classPathResource);
|
||||
_logger.debug("JWKSet KeyStore init.");
|
||||
return jwkSetKeyStore;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* jwtSetKeyStore.
|
||||
* @return
|
||||
@@ -133,10 +133,10 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
||||
* @throws NoSuchAlgorithmException
|
||||
*/
|
||||
@Bean(name = "jwtSignerValidationService")
|
||||
public DefaultJwtSigningAndValidationService jwtSignerValidationService(
|
||||
@Qualifier("jwkSetKeyStore")
|
||||
JWKSetKeyStore jwkSetKeyStore)
|
||||
throws NoSuchAlgorithmException, InvalidKeySpecException, JOSEException {
|
||||
DefaultJwtSigningAndValidationService jwtSignerValidationService(
|
||||
@Qualifier("jwkSetKeyStore")
|
||||
JWKSetKeyStore jwkSetKeyStore)
|
||||
throws NoSuchAlgorithmException, InvalidKeySpecException, JOSEException {
|
||||
DefaultJwtSigningAndValidationService jwtSignerValidationService =
|
||||
new DefaultJwtSigningAndValidationService(jwkSetKeyStore);
|
||||
jwtSignerValidationService.setDefaultSignerKeyId("maxkey_rsa");
|
||||
@@ -144,7 +144,7 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
||||
_logger.debug("JWT Signer and Validation Service init.");
|
||||
return jwtSignerValidationService;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* jwtSetKeyStore.
|
||||
* @return
|
||||
@@ -153,10 +153,10 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
||||
* @throws NoSuchAlgorithmException
|
||||
*/
|
||||
@Bean(name = "jwtEncryptionService")
|
||||
public DefaultJwtEncryptionAndDecryptionService jwtEncryptionService(
|
||||
@Qualifier("jwkSetKeyStore")
|
||||
JWKSetKeyStore jwkSetKeyStore)
|
||||
throws NoSuchAlgorithmException, InvalidKeySpecException, JOSEException {
|
||||
DefaultJwtEncryptionAndDecryptionService jwtEncryptionService(
|
||||
@Qualifier("jwkSetKeyStore")
|
||||
JWKSetKeyStore jwkSetKeyStore)
|
||||
throws NoSuchAlgorithmException, InvalidKeySpecException, JOSEException {
|
||||
DefaultJwtEncryptionAndDecryptionService jwtEncryptionService =
|
||||
new DefaultJwtEncryptionAndDecryptionService(jwkSetKeyStore);
|
||||
jwtEncryptionService.setDefaultAlgorithm(JWEAlgorithm.RSA_OAEP_256);//RSA1_5
|
||||
@@ -165,13 +165,13 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
||||
_logger.debug("JWT Encryption and Decryption Service init.");
|
||||
return jwtEncryptionService;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* tokenEnhancer.
|
||||
* @return
|
||||
*/
|
||||
@Bean(name = "tokenEnhancer")
|
||||
public OIDCIdTokenEnhancer tokenEnhancer(
|
||||
OIDCIdTokenEnhancer tokenEnhancer(
|
||||
OIDCProviderMetadataDetails oidcProviderMetadata,
|
||||
ClientDetailsService oauth20JdbcClientDetailsService) {
|
||||
OIDCIdTokenEnhancer tokenEnhancer = new OIDCIdTokenEnhancer();
|
||||
@@ -180,6 +180,7 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
||||
_logger.debug("OIDC IdToken Enhancer init.");
|
||||
return tokenEnhancer;
|
||||
}
|
||||
|
||||
//以上部分为了支持OpenID Connect 1.0
|
||||
|
||||
|
||||
@@ -189,57 +190,57 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
||||
* @return oauth20AuthorizationCodeServices
|
||||
*/
|
||||
@Bean(name = "oauth20AuthorizationCodeServices")
|
||||
public AuthorizationCodeServices oauth20AuthorizationCodeServices(
|
||||
AuthorizationCodeServices oauth20AuthorizationCodeServices(
|
||||
@Value("${maxkey.server.persistence}") int persistence,
|
||||
JdbcTemplate jdbcTemplate,
|
||||
RedisConnectionFactory redisConnFactory) {
|
||||
_logger.debug("OAuth 2 Authorization Code Services init.");
|
||||
return new AuthorizationCodeServicesFactory().getService(persistence, jdbcTemplate, redisConnFactory);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* TokenStore.
|
||||
* @param persistence int
|
||||
* @return oauth20TokenStore
|
||||
*/
|
||||
@Bean(name = "oauth20TokenStore")
|
||||
public TokenStore oauth20TokenStore(
|
||||
TokenStore oauth20TokenStore(
|
||||
@Value("${maxkey.server.persistence}") int persistence,
|
||||
JdbcTemplate jdbcTemplate,
|
||||
RedisConnectionFactory redisConnFactory) {
|
||||
_logger.debug("OAuth 2 TokenStore init.");
|
||||
return new TokenStoreFactory().getTokenStore(persistence, jdbcTemplate, redisConnFactory);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* jwtAccessTokenConverter.
|
||||
* @return converter
|
||||
*/
|
||||
@Bean(name = "converter")
|
||||
public JwtAccessTokenConverter jwtAccessTokenConverter() {
|
||||
JwtAccessTokenConverter jwtAccessTokenConverter() {
|
||||
JwtAccessTokenConverter jwtAccessTokenConverter = new JwtAccessTokenConverter();
|
||||
_logger.debug("OAuth 2 Jwt AccessToken Converter init.");
|
||||
return jwtAccessTokenConverter;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* clientDetailsService.
|
||||
* @return 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);
|
||||
//clientDetailsService.setPasswordEncoder(passwordReciprocal);
|
||||
_logger.debug("OAuth 2 Jdbc ClientDetails Service init.");
|
||||
return clientDetailsService;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* clientDetailsUserDetailsService.
|
||||
* @return oauth20TokenServices
|
||||
*/
|
||||
@Bean(name = "oauth20TokenServices")
|
||||
public DefaultTokenServices defaultTokenServices(
|
||||
DefaultTokenServices defaultTokenServices(
|
||||
JdbcClientDetailsService oauth20JdbcClientDetailsService,
|
||||
TokenStore oauth20TokenStore,
|
||||
OIDCIdTokenEnhancer tokenEnhancer) {
|
||||
@@ -251,45 +252,45 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
||||
_logger.debug("OAuth 2 Token Services init.");
|
||||
return tokenServices;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* TokenApprovalStore.
|
||||
* @return oauth20ApprovalStore
|
||||
*/
|
||||
@Bean(name = "oauth20ApprovalStore")
|
||||
public TokenApprovalStore tokenApprovalStore(
|
||||
TokenApprovalStore tokenApprovalStore(
|
||||
TokenStore oauth20TokenStore) {
|
||||
TokenApprovalStore tokenApprovalStore = new TokenApprovalStore();
|
||||
tokenApprovalStore.setTokenStore(oauth20TokenStore);
|
||||
_logger.debug("OAuth 2 Approval Store init.");
|
||||
return tokenApprovalStore;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* OAuth2RequestFactory.
|
||||
* @return oAuth2RequestFactory
|
||||
*/
|
||||
@Bean(name = "oAuth2RequestFactory")
|
||||
public DefaultOAuth2RequestFactory oauth2RequestFactory(
|
||||
DefaultOAuth2RequestFactory oauth2RequestFactory(
|
||||
JdbcClientDetailsService oauth20JdbcClientDetailsService) {
|
||||
DefaultOAuth2RequestFactory oauth2RequestFactory =
|
||||
new DefaultOAuth2RequestFactory(oauth20JdbcClientDetailsService);
|
||||
_logger.debug("OAuth 2 Request Factory init.");
|
||||
return oauth2RequestFactory;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* OAuth20UserApprovalHandler.
|
||||
* @return oauth20UserApprovalHandler
|
||||
*/
|
||||
@Bean(name = "oauth20UserApprovalHandler")
|
||||
public OAuth20UserApprovalHandler oauth20UserApprovalHandler(
|
||||
OAuth20UserApprovalHandler oauth20UserApprovalHandler(
|
||||
JdbcClientDetailsService oauth20JdbcClientDetailsService,
|
||||
DefaultOAuth2RequestFactory oAuth2RequestFactory,
|
||||
TokenApprovalStore oauth20ApprovalStore
|
||||
) {
|
||||
) {
|
||||
OAuth20UserApprovalHandler userApprovalHandler = new OAuth20UserApprovalHandler();
|
||||
userApprovalHandler.setApprovalStore(oauth20ApprovalStore);
|
||||
userApprovalHandler.setRequestFactory(oAuth2RequestFactory);
|
||||
@@ -297,17 +298,17 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
||||
_logger.debug("OAuth 2 User Approval Handler init.");
|
||||
return userApprovalHandler;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* ProviderManager.
|
||||
* @return oauth20UserAuthenticationManager
|
||||
*/
|
||||
@Bean(name = "oauth20UserAuthenticationManager")
|
||||
public ProviderManager oauth20UserAuthenticationManager(
|
||||
@Qualifier("passwordEncoder")
|
||||
ProviderManager oauth20UserAuthenticationManager(
|
||||
@Qualifier("passwordEncoder")
|
||||
PasswordEncoder passwordEncoder,
|
||||
LoginRepository loginRepository
|
||||
) {
|
||||
) {
|
||||
|
||||
OAuth2UserDetailsService userDetailsService =new OAuth2UserDetailsService();
|
||||
userDetailsService.setLoginRepository(loginRepository);
|
||||
@@ -319,17 +320,17 @@ public class Oauth20AutoConfiguration implements InitializingBean {
|
||||
_logger.debug("OAuth 2 User Authentication Manager init.");
|
||||
return authenticationManager;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* ProviderManager.
|
||||
* @return oauth20ClientAuthenticationManager
|
||||
*/
|
||||
@Bean(name = "oauth20ClientAuthenticationManager")
|
||||
public ProviderManager oauth20ClientAuthenticationManager(
|
||||
ProviderManager oauth20ClientAuthenticationManager(
|
||||
JdbcClientDetailsService oauth20JdbcClientDetailsService,
|
||||
@Qualifier("passwordReciprocal")
|
||||
@Qualifier("passwordReciprocal")
|
||||
PasswordEncoder passwordReciprocal
|
||||
) {
|
||||
) {
|
||||
|
||||
ClientDetailsUserDetailsService cientDetailsUserDetailsService =
|
||||
new ClientDetailsUserDetailsService(oauth20JdbcClientDetailsService);
|
||||
|
||||
@@ -60,76 +60,76 @@ import org.springframework.ui.velocity.VelocityEngineFactoryBean;
|
||||
})
|
||||
public class Saml20AutoConfiguration implements InitializingBean {
|
||||
private static final Logger _logger = LoggerFactory.getLogger(Saml20AutoConfiguration.class);
|
||||
|
||||
|
||||
/**
|
||||
* samlBootstrapInitializer.
|
||||
* @return samlBootstrapInitializer
|
||||
* @throws ConfigurationException
|
||||
*/
|
||||
@Bean(name = "samlBootstrapInitializer")
|
||||
public String samlBootstrapInitializer() throws ConfigurationException {
|
||||
String samlBootstrapInitializer() throws ConfigurationException {
|
||||
org.opensaml.DefaultBootstrap.bootstrap();
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* TimeService.
|
||||
* @return timeService
|
||||
*/
|
||||
@Bean(name = "timeService")
|
||||
public TimeService TimeService() {
|
||||
TimeService TimeService() {
|
||||
TimeService timeService = new TimeService();
|
||||
return timeService;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* IDService.
|
||||
* @return idService
|
||||
*/
|
||||
@Bean(name = "idService")
|
||||
public IDService idService() {
|
||||
IDService idService() {
|
||||
IDService idService = new IDService();
|
||||
return idService;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* EndpointGenerator.
|
||||
* @return endpointGenerator
|
||||
*/
|
||||
@Bean(name = "endpointGenerator")
|
||||
public EndpointGenerator endpointGenerator() {
|
||||
EndpointGenerator endpointGenerator() {
|
||||
EndpointGenerator generator = new EndpointGenerator();
|
||||
return generator;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* AuthnResponseGenerator.
|
||||
* @return authnResponseGenerator
|
||||
*/
|
||||
@Bean(name = "authnResponseGenerator")
|
||||
public AuthnResponseGenerator authnResponseGenerator(TimeService timeService,IDService idService,
|
||||
@Value("${maxkey.saml.v20.idp.issuer}") String issuerEntityName) {
|
||||
AuthnResponseGenerator authnResponseGenerator(TimeService timeService, IDService idService,
|
||||
@Value("${maxkey.saml.v20.idp.issuer}") String issuerEntityName) {
|
||||
_logger.debug("issuerEntityName {}" , issuerEntityName);
|
||||
AuthnResponseGenerator generator = new AuthnResponseGenerator(issuerEntityName,timeService,idService);
|
||||
return generator;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* IssuerEntityName.
|
||||
* @return issuerEntityName
|
||||
*/
|
||||
@Bean(name = "issuerEntityName")
|
||||
public String issuerEntityName(
|
||||
String issuerEntityName(
|
||||
@Value("${maxkey.saml.v20.idp.issuer}") String issuerEntityName) {
|
||||
return issuerEntityName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Saml20Metadata.
|
||||
* @return saml20Metadata
|
||||
*/
|
||||
@Bean(name = "saml20Metadata")
|
||||
public Saml20Metadata saml20Metadata(
|
||||
Saml20Metadata saml20Metadata(
|
||||
@Value("${maxkey.saml.v20.metadata.orgName}") String orgName,
|
||||
@Value("${maxkey.saml.v20.metadata.orgDisplayName}") String orgDisplayName,
|
||||
@Value("${maxkey.saml.v20.metadata.orgURL}") String orgURL,
|
||||
@@ -157,31 +157,31 @@ public class Saml20AutoConfiguration implements InitializingBean {
|
||||
* @return samlValidaotrSuite
|
||||
*/
|
||||
@Bean(name = "samlValidaotrSuite")
|
||||
public SAML2ValidatorSuite validatorSuite() {
|
||||
SAML2ValidatorSuite validatorSuite() {
|
||||
SAML2ValidatorSuite validatorSuite = new SAML2ValidatorSuite();
|
||||
return validatorSuite;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* MapBasedStorageService.
|
||||
* @return mapBasedStorageService
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Bean(name = "mapBasedStorageService")
|
||||
public MapBasedStorageService mapBasedStorageService() {
|
||||
MapBasedStorageService mapBasedStorageService() {
|
||||
MapBasedStorageService mapBasedStorageService = new MapBasedStorageService();
|
||||
return mapBasedStorageService;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* VelocityEngineFactoryBean.
|
||||
* @return velocityEngine
|
||||
* @throws IOException
|
||||
* @throws VelocityException
|
||||
*/
|
||||
@SuppressWarnings({ "deprecation"})
|
||||
@SuppressWarnings({"deprecation"})
|
||||
@Bean(name = "velocityEngine")
|
||||
public VelocityEngine velocityEngine() throws VelocityException, IOException {
|
||||
VelocityEngine velocityEngine() throws VelocityException, IOException {
|
||||
VelocityEngineFactoryBean factory = new VelocityEngineFactoryBean();
|
||||
factory.setPreferFileSystemAccess(false);
|
||||
Properties velocityProperties = new Properties();
|
||||
@@ -191,138 +191,138 @@ public class Saml20AutoConfiguration implements InitializingBean {
|
||||
factory.setVelocityProperties(velocityProperties);
|
||||
return factory.createVelocityEngine();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* ReplayCache.
|
||||
* @return replayCache
|
||||
*/
|
||||
@Bean(name = "replayCache")
|
||||
public ReplayCache replayCache(MapBasedStorageService<String, ReplayCacheEntry> mapBasedStorageService,
|
||||
@Value("${maxkey.saml.v20.replay.cache.life.in.millis}") long duration) {
|
||||
ReplayCache replayCache(MapBasedStorageService<String, ReplayCacheEntry> mapBasedStorageService,
|
||||
@Value("${maxkey.saml.v20.replay.cache.life.in.millis}") long duration) {
|
||||
ReplayCache replayCache = new ReplayCache(mapBasedStorageService,duration);
|
||||
return replayCache;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* MessageReplayRule.
|
||||
* @return messageReplayRule
|
||||
*/
|
||||
@Bean(name = "messageReplayRule")
|
||||
public MessageReplayRule messageReplayRule(ReplayCache replayCache) {
|
||||
MessageReplayRule messageReplayRule(ReplayCache replayCache) {
|
||||
MessageReplayRule messageReplayRule = new MessageReplayRule(replayCache);
|
||||
return messageReplayRule;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* BasicParserPool.
|
||||
* @return samlParserPool
|
||||
*/
|
||||
@Bean(name = "samlParserPool")
|
||||
public BasicParserPool samlParserPool(
|
||||
BasicParserPool samlParserPool(
|
||||
@Value("${maxkey.saml.v20.max.parser.pool.size}") int maxPoolSize) {
|
||||
BasicParserPool samlParserPool = new BasicParserPool();
|
||||
samlParserPool.setMaxPoolSize(maxPoolSize);
|
||||
return samlParserPool;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* IssueInstantRule.
|
||||
* @return 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.validity.time.in.seconds}") int newExpires) {
|
||||
IssueInstantRule decoder = new IssueInstantRule(newClockSkew,newExpires);
|
||||
decoder.setRequiredRule(true);
|
||||
return decoder;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* OpenHTTPPostSimpleSignDecoder.
|
||||
* @return openHTTPPostSimpleSignDecoder
|
||||
*/
|
||||
@Bean(name = "openHTTPPostSimpleSignDecoder")
|
||||
public OpenHTTPPostSimpleSignDecoder openHTTPPostSimpleSignDecoder(BasicParserPool samlParserPool,
|
||||
@Value("${maxkey.saml.v20.idp.receiver.endpoint}") String receiverEndpoint) {
|
||||
OpenHTTPPostSimpleSignDecoder openHTTPPostSimpleSignDecoder(BasicParserPool samlParserPool,
|
||||
@Value("${maxkey.saml.v20.idp.receiver.endpoint}") String receiverEndpoint) {
|
||||
OpenHTTPPostSimpleSignDecoder decoder = new OpenHTTPPostSimpleSignDecoder(samlParserPool);
|
||||
decoder.setReceiverEndpoint(receiverEndpoint);
|
||||
return decoder;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* OpenHTTPPostDecoder.
|
||||
* @return openHTTPPostDecoder
|
||||
*/
|
||||
@Bean(name = "openHTTPPostDecoder")
|
||||
public OpenHTTPPostDecoder openHTTPPostDecoder(BasicParserPool samlParserPool,
|
||||
@Value("${maxkey.saml.v20.idp.receiver.endpoint}") String receiverEndpoint) {
|
||||
OpenHTTPPostDecoder openHTTPPostDecoder(BasicParserPool samlParserPool,
|
||||
@Value("${maxkey.saml.v20.idp.receiver.endpoint}") String receiverEndpoint) {
|
||||
OpenHTTPPostDecoder decoder = new OpenHTTPPostDecoder(samlParserPool);
|
||||
decoder.setReceiverEndpoint(receiverEndpoint);
|
||||
return decoder;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* OpenHTTPRedirectDecoder.
|
||||
* @return openHTTPRedirectDecoder
|
||||
*/
|
||||
@Bean(name = "openHTTPRedirectDecoder")
|
||||
public OpenHTTPRedirectDecoder openHTTPRedirectDecoder(BasicParserPool samlParserPool,
|
||||
@Value("${maxkey.saml.v20.idp.receiver.endpoint}") String receiverEndpoint) {
|
||||
OpenHTTPRedirectDecoder openHTTPRedirectDecoder(BasicParserPool samlParserPool,
|
||||
@Value("${maxkey.saml.v20.idp.receiver.endpoint}") String receiverEndpoint) {
|
||||
OpenHTTPRedirectDecoder decoder = new OpenHTTPRedirectDecoder(samlParserPool);
|
||||
decoder.setReceiverEndpoint(receiverEndpoint);
|
||||
return decoder;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* ExtractPostBindingAdapter.
|
||||
* @return extractPostBindingAdapter
|
||||
*/
|
||||
@Bean(name = "extractPostBindingAdapter")
|
||||
public ExtractPostBindingAdapter extractPostBindingAdapter(OpenHTTPPostDecoder openHTTPPostDecoder,
|
||||
@Qualifier("keyStoreLoader") KeyStoreLoader keyStoreLoader,IssueInstantRule issueInstantRule,MessageReplayRule messageReplayRule) {
|
||||
ExtractPostBindingAdapter extractPostBindingAdapter(OpenHTTPPostDecoder openHTTPPostDecoder,
|
||||
@Qualifier("keyStoreLoader") KeyStoreLoader keyStoreLoader, IssueInstantRule issueInstantRule, MessageReplayRule messageReplayRule) {
|
||||
ExtractPostBindingAdapter adapter = new ExtractPostBindingAdapter(openHTTPPostDecoder);
|
||||
adapter.setIssueInstantRule(issueInstantRule);
|
||||
adapter.setKeyStoreLoader(keyStoreLoader);
|
||||
adapter.setMessageReplayRule(messageReplayRule);
|
||||
return adapter;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* ExtractRedirectBindingAdapter.
|
||||
* @return extractRedirectBindingAdapter
|
||||
*/
|
||||
@Bean(name = "extractRedirectBindingAdapter")
|
||||
public ExtractRedirectBindingAdapter extractRedirectBindingAdapter(OpenHTTPRedirectDecoder openHTTPRedirectDecoder,
|
||||
@Qualifier("keyStoreLoader") KeyStoreLoader keyStoreLoader,IssueInstantRule issueInstantRule,MessageReplayRule messageReplayRule) {
|
||||
ExtractRedirectBindingAdapter extractRedirectBindingAdapter(OpenHTTPRedirectDecoder openHTTPRedirectDecoder,
|
||||
@Qualifier("keyStoreLoader") KeyStoreLoader keyStoreLoader, IssueInstantRule issueInstantRule, MessageReplayRule messageReplayRule) {
|
||||
ExtractRedirectBindingAdapter adapter = new ExtractRedirectBindingAdapter(openHTTPRedirectDecoder);
|
||||
adapter.setIssueInstantRule(issueInstantRule);
|
||||
adapter.setKeyStoreLoader(keyStoreLoader);
|
||||
adapter.setMessageReplayRule(messageReplayRule);
|
||||
return adapter;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* PostSimpleSignBindingAdapter.
|
||||
* @return postSimpleSignBindingAdapter
|
||||
*/
|
||||
@Bean(name = "postSimpleSignBindingAdapter")
|
||||
public PostSimpleSignBindingAdapter postSimpleSignBindingAdapter(VelocityEngine velocityEngine,
|
||||
@Value("${maxkey.saml.v20.idp.issuer}") String issuerEntityName) {
|
||||
PostSimpleSignBindingAdapter postSimpleSignBindingAdapter(VelocityEngine velocityEngine,
|
||||
@Value("${maxkey.saml.v20.idp.issuer}") String issuerEntityName) {
|
||||
PostSimpleSignBindingAdapter adapter = new PostSimpleSignBindingAdapter();
|
||||
adapter.setVelocityEngine(velocityEngine);
|
||||
adapter.setIssuerEntityName(issuerEntityName);
|
||||
return adapter;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* PostBindingAdapter.
|
||||
* @return postBindingAdapter
|
||||
*/
|
||||
@Bean(name = "postBindingAdapter")
|
||||
public PostBindingAdapter postBindingAdapter(VelocityEngine velocityEngine,
|
||||
@Value("${maxkey.saml.v20.idp.issuer}") String issuerEntityName) {
|
||||
PostBindingAdapter postBindingAdapter(VelocityEngine velocityEngine,
|
||||
@Value("${maxkey.saml.v20.idp.issuer}") String issuerEntityName) {
|
||||
PostBindingAdapter adapter = new PostBindingAdapter();
|
||||
adapter.setVelocityEngine(velocityEngine);
|
||||
adapter.setIssuerEntityName(issuerEntityName);
|
||||
|
||||
Reference in New Issue
Block a user