Search in sources :

Example 1 with LdapServiceRegistry

use of org.apereo.cas.adaptors.ldap.services.LdapServiceRegistry in project cas by apereo.

the class LdapServiceRegistryConfiguration method ldapServiceRegistry.

@Bean
@RefreshScope
public ServiceRegistry ldapServiceRegistry() {
    final LdapServiceRegistryProperties ldap = casProperties.getServiceRegistry().getLdap();
    final ConnectionFactory connectionFactory = LdapUtils.newLdaptivePooledConnectionFactory(ldap);
    return new LdapServiceRegistry(connectionFactory, ldap.getBaseDn(), ldapServiceRegistryMapper(), ldap);
}
Also used : ConnectionFactory(org.ldaptive.ConnectionFactory) LdapServiceRegistry(org.apereo.cas.adaptors.ldap.services.LdapServiceRegistry) LdapServiceRegistryProperties(org.apereo.cas.configuration.model.support.ldap.serviceregistry.LdapServiceRegistryProperties) RefreshScope(org.springframework.cloud.context.config.annotation.RefreshScope) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

LdapServiceRegistry (org.apereo.cas.adaptors.ldap.services.LdapServiceRegistry)1 LdapServiceRegistryProperties (org.apereo.cas.configuration.model.support.ldap.serviceregistry.LdapServiceRegistryProperties)1 ConnectionFactory (org.ldaptive.ConnectionFactory)1 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 RefreshScope (org.springframework.cloud.context.config.annotation.RefreshScope)1 Bean (org.springframework.context.annotation.Bean)1