public static Authenticator newLdaptiveAuthenticator(final AbstractLdapAuthenticationProperties props) {
        switch (props.getType()) {
            case AD -> {
                LOGGER.debug("Creating active directory authenticator for [{}]", props.getLdapUrl());
                return getActiveDirectoryAuthenticator(props);
            }
            case DIRECT -> {
                LOGGER.debug("Creating direct-bind authenticator for [{}]", props.getLdapUrl());
                return getDirectBindAuthenticator(props);
            }
            case AUTHENTICATED -> {
                LOGGER.debug("Creating authenticated authenticator for [{}]", props.getLdapUrl());
                return getAuthenticatedOrAnonSearchAuthenticator(props);
            }
            default -> {
                LOGGER.debug("Creating anonymous authenticator for [{}]", props.getLdapUrl());
                return getAuthenticatedOrAnonSearchAuthenticator(props);
            }
        }
    }
New ldap authenticator.

@param props the ldap settings.
@return the authenticator
support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java