@ShellMethod(key = "validate-ldap", value = "Test connections to an LDAP server to verify connectivity, SSL, etc")
    public boolean validateLdap(
        @ShellOption(value = {"url", "--url"},
            help = "LDAP URL to test, comma-separated.")
        final String url,
        @ShellOption(value = {"bindDn", "--bindDn"},
            help = "bindDn to use when testing the LDAP server")
        final String bindDn,
        @ShellOption(value = {"bindCredential", "--bindCredential"},
            help = "bindCredential to use when testing the LDAP server")
        final String bindCredential,
        @ShellOption(value = {"baseDn", "--baseDn"},
            help = "baseDn to use when testing the LDAP server, searching for accounts (i.e. OU=some,DC=org,DC=edu)")
        final String baseDn,
        @ShellOption(value = {"searchFilter", "--searchFilter"},
            help = "Filter to use when searching for accounts (i.e. (&(objectClass=*) (sAMAccountName=user)))",
            defaultValue = org.apache.commons.lang3.StringUtils.EMPTY)
        final String searchFilter,
        @ShellOption(value = {"userPassword", "--userPassword"},
            help = "Password for the user found in the search result, to attempt authentication",
            defaultValue = org.apache.commons.lang3.StringUtils.EMPTY)
        final String userPassword,
        @ShellOption(value = {"userAttributes", "--userAttributes"},
            help = "User attributes, comma-separated, to fetch for the user found in the search result",
            defaultValue = org.apache.commons.lang3.StringUtils.EMPTY)
        final String userAttributes) {
        try {
            return connect(url, bindDn, bindCredential, baseDn, searchFilter, userAttributes, userPassword);
        } catch (final Exception e) {
            LoggingUtils.error(LOGGER, e);
        }
        return false;
    }
Validate endpoint.

@param url            the url
@param bindDn         the bind dn
@param bindCredential the bind credential
@param baseDn         the base dn
@param searchFilter   the search filter
@param userPassword   the user password
@param userAttributes the user attributes
@return true/false
support/cas-server-support-shell-core/src/main/java/org/apereo/cas/shell/commands/util/ValidateLdapConnectionCommand.java