use of org.springframework.cloud.context.config.annotation.RefreshScope in project cas by apereo.
the class SurrogateLdapAuthenticationConfiguration method surrogateAuthenticationService.
@RefreshScope
@Bean
public SurrogateAuthenticationService surrogateAuthenticationService() {
final SurrogateAuthenticationProperties su = casProperties.getAuthn().getSurrogate();
LOGGER.debug("Using LDAP [{}] with baseDn [{}] to locate surrogate accounts", su.getLdap().getLdapUrl(), su.getLdap().getBaseDn());
final ConnectionFactory factory = LdapUtils.newLdaptivePooledConnectionFactory(su.getLdap());
return new SurrogateLdapAuthenticationService(factory, su.getLdap(), servicesManager);
}
use of org.springframework.cloud.context.config.annotation.RefreshScope in project cas by apereo.
the class OidcConfiguration method oidcAuthenticationContextWebflowEventResolver.
@Autowired
@RefreshScope
@Bean
public CasWebflowEventResolver oidcAuthenticationContextWebflowEventResolver(@Qualifier("defaultAuthenticationSystemSupport") final AuthenticationSystemSupport authenticationSystemSupport) {
final CasWebflowEventResolver r = new OidcAuthenticationContextWebflowEventEventResolver(authenticationSystemSupport, centralAuthenticationService, servicesManager, ticketRegistrySupport, warnCookieGenerator, authenticationRequestServiceSelectionStrategies, multifactorAuthenticationProviderSelector);
this.initialAuthenticationAttemptWebflowEventResolver.addDelegate(r);
return r;
}
use of org.springframework.cloud.context.config.annotation.RefreshScope in project cas by apereo.
the class CouchbaseServiceRegistryConfiguration method serviceRegistryCouchbaseClientFactory.
/**
* Service registry couchbase client factory couchbase client factory.
*
* @return the couchbase client factory
*/
@RefreshScope
@Bean
public CouchbaseClientFactory serviceRegistryCouchbaseClientFactory() {
final CouchbaseServiceRegistryProperties couchbase = casProperties.getServiceRegistry().getCouchbase();
final Set<String> nodes = StringUtils.commaDelimitedListToSet(couchbase.getNodeSet());
return new CouchbaseClientFactory(nodes, couchbase.getBucket(), couchbase.getPassword(), Beans.newDuration(couchbase.getTimeout()).toMillis(), CouchbaseServiceRegistry.UTIL_DOCUMENT, CouchbaseServiceRegistry.ALL_VIEWS);
}
use of org.springframework.cloud.context.config.annotation.RefreshScope in project cas by apereo.
the class CouchbaseTicketRegistryConfiguration method ticketRegistry.
@Autowired
@RefreshScope
@Bean
public TicketRegistry ticketRegistry(@Qualifier("ticketCatalog") final TicketCatalog ticketCatalog) {
final CouchbaseTicketRegistryProperties couchbase = casProperties.getTicket().getRegistry().getCouchbase();
final CouchbaseTicketRegistry c = new CouchbaseTicketRegistry(ticketCatalog, ticketRegistryCouchbaseClientFactory());
c.setCipherExecutor(CoreTicketUtils.newTicketRegistryCipherExecutor(couchbase.getCrypto(), "couchbase"));
return c;
}
use of org.springframework.cloud.context.config.annotation.RefreshScope in project cas by apereo.
the class CouchbaseTicketRegistryConfiguration method ticketRegistryCouchbaseClientFactory.
@RefreshScope
@Bean
public CouchbaseClientFactory ticketRegistryCouchbaseClientFactory() {
final CouchbaseTicketRegistryProperties cb = casProperties.getTicket().getRegistry().getCouchbase();
final Set<String> nodes = StringUtils.commaDelimitedListToSet(cb.getNodeSet());
return new CouchbaseClientFactory(nodes, cb.getBucket(), cb.getPassword(), Beans.newDuration(cb.getTimeout()).toMillis(), CouchbaseTicketRegistry.UTIL_DOCUMENT, CouchbaseTicketRegistry.ALL_VIEWS);
}
Aggregations