use of org.springframework.cloud.context.config.annotation.RefreshScope in project cas by apereo.
the class CasWebflowContextConfiguration method localeChangeInterceptor.
@RefreshScope
@Bean
public LocaleChangeInterceptor localeChangeInterceptor() {
final LocaleChangeInterceptor bean = new LocaleChangeInterceptor();
bean.setParamName(this.casProperties.getLocale().getParamName());
return bean;
}
use of org.springframework.cloud.context.config.annotation.RefreshScope in project cas by apereo.
the class CasWebflowContextConfiguration method logoutHandlerAdapter.
@RefreshScope
@Bean
public HandlerAdapter logoutHandlerAdapter() {
final FlowHandlerAdapter handler = new CasFlowHandlerAdapter(CasWebflowConfigurer.FLOW_ID_LOGOUT);
handler.setFlowExecutor(logoutFlowExecutor());
handler.setFlowUrlHandler(logoutFlowUrlHandler());
return handler;
}
use of org.springframework.cloud.context.config.annotation.RefreshScope in project cas by apereo.
the class CasAcceptableUsagePolicyLdapConfiguration method acceptableUsagePolicyRepository.
@RefreshScope
@Bean
public AcceptableUsagePolicyRepository acceptableUsagePolicyRepository() {
final AcceptableUsagePolicyProperties.Ldap ldap = casProperties.getAcceptableUsagePolicy().getLdap();
final ConnectionFactory connectionFactory = LdapUtils.newLdaptivePooledConnectionFactory(ldap);
return new LdapAcceptableUsagePolicyRepository(ticketRegistrySupport, casProperties.getAcceptableUsagePolicy().getAupAttributeName(), connectionFactory, ldap.getSearchFilter(), ldap.getBaseDn());
}
use of org.springframework.cloud.context.config.annotation.RefreshScope in project cas by apereo.
the class CasAcceptableUsagePolicyMongoDbConfiguration method mongoAcceptableUsagePolicyTemplate.
@RefreshScope
@Bean
public MongoTemplate mongoAcceptableUsagePolicyTemplate() {
final AcceptableUsagePolicyProperties.MongoDb mongo = casProperties.getAcceptableUsagePolicy().getMongo();
final MongoDbConnectionFactory factory = new MongoDbConnectionFactory();
final MongoTemplate mongoTemplate = factory.buildMongoTemplate(mongo);
factory.createCollection(mongoTemplate, mongo.getCollection(), mongo.isDropCollection());
return mongoTemplate;
}
use of org.springframework.cloud.context.config.annotation.RefreshScope in project cas by apereo.
the class AzureAuthenticatorAuthenticationEventExecutionPlanConfiguration method azureAuthenticatorAuthenticationProvider.
@Bean
@RefreshScope
public MultifactorAuthenticationProvider azureAuthenticatorAuthenticationProvider() {
final AzureMultifactorProperties azure = casProperties.getAuthn().getMfa().getAzure();
final AzureAuthenticatorMultifactorAuthenticationProvider p = new AzureAuthenticatorMultifactorAuthenticationProvider();
p.setBypassEvaluator(azureBypassEvaluator());
p.setGlobalFailureMode(casProperties.getAuthn().getMfa().getGlobalFailureMode());
p.setOrder(azure.getRank());
p.setId(azure.getId());
return p;
}
Aggregations