@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    @Bean
    public AcceptableUsagePolicyRepository acceptableUsagePolicyRepository(
        final ConfigurableApplicationContext applicationContext,
        final CasConfigurationProperties casProperties,
        @Qualifier(TicketRegistrySupport.BEAN_NAME)
        final TicketRegistrySupport ticketRegistrySupport) {
        return BeanSupplier.of(AcceptableUsagePolicyRepository.class)
            .when(AcceptableUsagePolicyRepository.CONDITION_AUP_ENABLED.given(applicationContext.getEnvironment()))
            .supply(() -> {
                val connectionFactoryList = new ConcurrentHashMap<String, ConnectionFactory>();
                val aupProperties = casProperties.getAcceptableUsagePolicy();
                aupProperties.getLdap().forEach(ldap -> connectionFactoryList.put(ldap.getLdapUrl(), LdapUtils.newLdaptiveConnectionFactory(ldap)));
                return new LdapAcceptableUsagePolicyRepository(ticketRegistrySupport, aupProperties, connectionFactoryList);
            })
            .otherwise(AcceptableUsagePolicyRepository::noOp)
            .get();
    }
This is {@link CasAcceptableUsagePolicyLdapAutoConfiguration}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-aup-ldap/src/main/java/org/apereo/cas/config/CasAcceptableUsagePolicyLdapAutoConfiguration.java