Class LdapEscaper


  • public class LdapEscaper
    extends java.lang.Object
    Helper class to encode LDAP names and filter values.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String escapeDN​(java.lang.String name)
      Escape data for use in a LDAP distinguished name (DN).
      static java.lang.String escapeFilter​(java.lang.String filter)
      Escape data for use in a LDAP filter query.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • escapeDN

        public static java.lang.String escapeDN​(java.lang.String name)
        Escape data for use in a LDAP distinguished name (DN).
        Parameters:
        name - the data to escape for a DN.
        Returns:
        name escaped for use in a DN.
      • escapeFilter

        public static java.lang.String escapeFilter​(java.lang.String filter)
        Escape data for use in a LDAP filter query.
        Parameters:
        filter - the data to escape for a filter query.
        Returns:
        name escaped for use in a filter query.