Class LdapUserQuery


  • public class LdapUserQuery
    extends Object
    Provides an LDAP User Query authenticating the LDAP user credentials and returning the specified attributes.
    • Constructor Detail

      • LdapUserQuery

        public LdapUserQuery()
    • Method Detail

      • getUserAttributes

        public Map<String,​Object> getUserAttributes​(String providerUrl,
                                                          String securityPrincipal,
                                                          String securityCredential,
                                                          String searchBase,
                                                          String searchFilter,
                                                          boolean searchSubTree,
                                                          List<String> attributeNames)
                                                   throws NamingException
        Perform a LDAP user query and return the specified user attributes. This method will not use LDAP connection pooling.
        Parameters:
        providerUrl - the LDAP provider server URL
        securityPrincipal - the user distinguished name
        securityCredential - the user password
        searchBase - the LDAP query search base
        searchFilter - the LDAP search filter
        searchSubTree - specify whether to use subtree search scope, or single level otherwise
        attributeNames - the list attributes to return
        Returns:
        the user attributes
        Throws:
        NamingException - if an error occurs
      • getUserAttributes

        public Map<String,​Object> getUserAttributes​(String providerUrl,
                                                          String securityPrincipal,
                                                          String securityCredential,
                                                          String searchBase,
                                                          String searchFilter,
                                                          boolean searchSubTree,
                                                          List<String> attributeNames,
                                                          boolean ldapConnectPooling)
                                                   throws NamingException
        Perform a LDAP user query and return the specified user attributes and LDAP connection pooling.
        Parameters:
        providerUrl - the LDAP provider server URL
        securityPrincipal - the user distinguished name
        securityCredential - the user password
        searchBase - the LDAP query search base
        searchFilter - the LDAP search filter
        searchSubTree - specify whether to use subtree search scope, or single level otherwise
        attributeNames - the list attributes to return
        ldapConnectPooling - use Sun LDAP connection pooling
        Returns:
        the user attributes
        Throws:
        NamingException - if an error occurs
        Since:
        4.0.0