Class LdapEncoder

java.lang.Object
com.codename1.backend.security.ldap.LdapEncoder

public final class LdapEncoder extends Object
Escaping for what a user types that ends up inside a filter or a distinguished name. Without it a user name of * matches the first entry of the directory, and admin)(|(uid=* rewrites the query.
  • Method Details

    • filterEncode

      public static String filterEncode(String value)
      value as an assertion value of a filter (RFC 4515 section 3): *, (, ), \ and NUL as \XX.
    • nameEncode

      public static String nameEncode(String value)
      value as one attribute value of a distinguished name (RFC 4514 section 2.4).