use of org.apereo.cas.configuration.model.support.ldap.serviceregistry.LdapServiceRegistryProperties in project cas by apereo.
the class LdapServiceRegistryConfiguration method serviceRegistryDao.
@Bean
@RefreshScope
@Autowired
public ServiceRegistryDao serviceRegistryDao(@Qualifier("ldapServiceRegistryMapper") final LdapRegisteredServiceMapper mapper) {
final LdapServiceRegistryProperties ldap = casProperties.getServiceRegistry().getLdap();
final ConnectionFactory connectionFactory = Beans.newLdaptivePooledConnectionFactory(ldap);
return new LdapServiceRegistryDao(connectionFactory, ldap.getBaseDn(), mapper, ldap);
}
use of org.apereo.cas.configuration.model.support.ldap.serviceregistry.LdapServiceRegistryProperties 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);
}
Aggregations