@Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    @ConditionalOnMissingBean(name = "consentLdapConnectionFactory")
    public ConnectionFactory consentLdapConnectionFactory(final CasConfigurationProperties casProperties) {
        val ldap = casProperties.getConsent().getLdap();
        return LdapUtils.newLdaptiveConnectionFactory(ldap);
    }
This is {@link CasConsentLdapAutoConfiguration}.

@author Arnold Bergner
@since 5.2.0
support/cas-server-support-consent-ldap/src/main/java/org/apereo/cas/config/CasConsentLdapAutoConfiguration.java