Class LdapCatalog

java.lang.Object
org.gridgain.internal.security.ldap.LdapCatalog

public class LdapCatalog extends Object
Ldap catalog accessor.
  • Constructor Details

    • LdapCatalog

      public LdapCatalog(String url, String user, String password) throws NamingException
      Constructor.

      When user is null or blank, the connection is bound anonymously; otherwise a simple bind is performed with the provided credentials.

      Parameters:
      url - Ldap server url.
      user - Principal user, or null/blank for an anonymous bind.
      password - Principal password.
      Throws:
      NamingException - in case when failed to connect to Ldap catalog.
  • Method Details

    • search

      public List<Map<String,List<String>>> search(String dn, String filter, ScopeType scope, String... attributes) throws NamingException
      Searches request for Ldap catalog.
      Parameters:
      dn - Distinguished name.
      filter - Search filter.
      scope - Search scope type.
      attributes - Searchable attributes.
      Returns:
      List of founded entries with attributes map.
      Throws:
      NamingException - in case when search request failed.
    • searchDn

      public List<String> searchDn(String dn, String filter, ScopeType scope) throws NamingException
      Searches the catalog and returns the full distinguished names of the matched entries.
      Parameters:
      dn - Base distinguished name to search under.
      filter - Search filter.
      scope - Search scope type.
      Returns:
      Distinguished names of the matched entries.
      Throws:
      NamingException - in case when search request failed.
    • close

      public void close() throws NamingException
      Throws:
      NamingException