Search in sources :

Example 1 with LdapAcceptableUsagePolicyRepository

use of org.apereo.cas.aup.LdapAcceptableUsagePolicyRepository 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());
}
Also used : ConnectionFactory(org.ldaptive.ConnectionFactory) LdapAcceptableUsagePolicyRepository(org.apereo.cas.aup.LdapAcceptableUsagePolicyRepository) AcceptableUsagePolicyProperties(org.apereo.cas.configuration.model.support.aup.AcceptableUsagePolicyProperties) RefreshScope(org.springframework.cloud.context.config.annotation.RefreshScope) Bean(org.springframework.context.annotation.Bean)

Aggregations

LdapAcceptableUsagePolicyRepository (org.apereo.cas.aup.LdapAcceptableUsagePolicyRepository)1 AcceptableUsagePolicyProperties (org.apereo.cas.configuration.model.support.aup.AcceptableUsagePolicyProperties)1 ConnectionFactory (org.ldaptive.ConnectionFactory)1 RefreshScope (org.springframework.cloud.context.config.annotation.RefreshScope)1 Bean (org.springframework.context.annotation.Bean)1