use of org.springframework.context.annotation.Bean in project cas by apereo.
the class CasCoreTicketsConfiguration method ticketCatalog.
@ConditionalOnMissingBean(name = "ticketCatalog")
@Autowired
@Bean
public TicketCatalog ticketCatalog(final List<TicketCatalogConfigurer> configurers) {
final DefaultTicketCatalog plan = new DefaultTicketCatalog();
configurers.forEach(c -> {
final String name = StringUtils.removePattern(c.getClass().getSimpleName(), "\\$.+");
LOGGER.debug("Configuring ticket metadata registration plan [{}]", name);
c.configureTicketCatalog(plan);
});
return plan;
}
use of org.springframework.context.annotation.Bean in project cas by apereo.
the class CasCoreConfiguration method authenticationServiceSelectionPlan.
@ConditionalOnMissingBean(name = "authenticationServiceSelectionPlan")
@Autowired
@Bean
public AuthenticationServiceSelectionPlan authenticationServiceSelectionPlan(final List<AuthenticationServiceSelectionStrategyConfigurer> configurers) {
final DefaultAuthenticationServiceSelectionPlan plan = new DefaultAuthenticationServiceSelectionPlan();
configurers.forEach(c -> {
final String name = StringUtils.removePattern(c.getClass().getSimpleName(), "\\$.+");
LOGGER.debug("Configuring authentication request service selection strategy plan [{}]", name);
c.configureAuthenticationServiceSelectionStrategy(plan);
});
return plan;
}
use of org.springframework.context.annotation.Bean in project cas by apereo.
the class CasCoreWebConfiguration method messageSource.
@RefreshScope
@Bean
public AbstractResourceBasedMessageSource messageSource() {
final CasReloadableMessageBundle bean = new CasReloadableMessageBundle();
bean.setDefaultEncoding(casProperties.getMessageBundle().getEncoding());
bean.setCacheSeconds(casProperties.getMessageBundle().getCacheSeconds());
bean.setFallbackToSystemLocale(casProperties.getMessageBundle().isFallbackSystemLocale());
bean.setUseCodeAsDefaultMessage(casProperties.getMessageBundle().isUseCodeMessage());
bean.setBasenames(casProperties.getMessageBundle().getBaseNames());
return bean;
}
use of org.springframework.context.annotation.Bean in project cas by apereo.
the class AuthyAuthenticationEventExecutionPlanConfiguration method authyAuthenticatorAuthenticationProvider.
@Bean
@RefreshScope
public MultifactorAuthenticationProvider authyAuthenticatorAuthenticationProvider() {
final AuthyMultifactorAuthenticationProvider p = new AuthyMultifactorAuthenticationProvider();
p.setBypassEvaluator(authyBypassEvaluator());
p.setGlobalFailureMode(casProperties.getAuthn().getMfa().getGlobalFailureMode());
p.setOrder(casProperties.getAuthn().getMfa().getAuthy().getRank());
p.setId(casProperties.getAuthn().getMfa().getAuthy().getId());
return p;
}
use of org.springframework.context.annotation.Bean in project cas by apereo.
the class CasSupportJdbcAuditConfiguration method inspektrAuditTransactionTemplate.
@Bean
public TransactionTemplate inspektrAuditTransactionTemplate() {
final TransactionTemplate t = new TransactionTemplate(inspektrAuditTransactionManager());
t.setIsolationLevelName(casProperties.getAudit().getJdbc().getIsolationLevelName());
t.setPropagationBehaviorName(casProperties.getAudit().getJdbc().getPropagationBehaviorName());
return t;
}
Aggregations