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());
}
Aggregations