Class LdapDataHelper

java.lang.Object
com.xebialabs.deployit.security.principaldata.LdapDataHelper

public class LdapDataHelper extends Object
Utility class for handling LDAP data retrieval. This class provides methods to read attributes from LDAP entries.
  • Constructor Details

    • LdapDataHelper

      public LdapDataHelper()
  • Method Details

    • readStringAttribute

      public static String readStringAttribute(String entryName, org.springframework.ldap.core.DirContextOperations data, String attribute)
      Reads a string attribute from an LDAP entry.
      Parameters:
      entryName - The name of the LDAP entry from which to read the attribute.
      data - The DirContextOperations instance containing the LDAP data.
      attribute - The name of the attribute to read.
      Returns:
      The value of the attribute as a String, or null if the attribute does not exist or cannot be cast to a String.