public LdapNetworkConnection bindAs(LDAPConfiguration config, String url,
            LdapNetworkConnection useCredentialsFrom)
            throws GuacamoleException {
        return bindAs(createLDAPConnection(config, url), useCredentialsFrom);
    }
Binds to the LDAP server indicated by the given LDAP URL using the
credentials that were used to bind an existing LdapNetworkConnection.

@param config
    The configuration of the LDAP server being queried.

@param url
    The LDAP URL containing the details which should be used to connect
    to the LDAP server.

@param useCredentialsFrom
    A bound LdapNetworkConnection whose bind credentials should be
    copied for use within this bind operation.

@return
    A bound LDAP connection, or null if the connection could not be
    bound.

@throws GuacamoleException
    If the given URL is not a valid LDAP URL, or if the encryption
    method indicated by the URL is known but not actually implemented (a
    bug).
extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/LDAPConnectionService.java