@ConditionalOnMissingBean(name = "cloudDirectoryAuthenticationHandler")
    @Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    public AuthenticationHandler cloudDirectoryAuthenticationHandler(
        final CasConfigurationProperties casProperties,
        final ConfigurableApplicationContext applicationContext,
        @Qualifier("cloudDirectoryPrincipalFactory")
        final PrincipalFactory cloudDirectoryPrincipalFactory,
        @Qualifier("cloudDirectoryRepository")
        final AmazonCloudDirectoryRepository cloudDirectoryRepository,
        @Qualifier(ServicesManager.BEAN_NAME)
        final ServicesManager servicesManager) {
        val cloud = casProperties.getAuthn().getCloudDirectory();
        val handler = new AmazonCloudDirectoryAuthenticationHandler(cloud.getName(), servicesManager, cloudDirectoryPrincipalFactory, cloudDirectoryRepository, cloud);
        handler.setPrincipalNameTransformer(PrincipalNameTransformerUtils.newPrincipalNameTransformer(cloud.getPrincipalTransformation()));
        handler.setPasswordEncoder(PasswordEncoderUtils.newPasswordEncoder(cloud.getPasswordEncoder(), applicationContext));
        return handler;
    }
This is {@link CasCloudDirectoryAuthenticationAutoConfiguration}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-cloud-directory-authentication/src/main/java/org/apereo/cas/config/CasCloudDirectoryAuthenticationAutoConfiguration.java