com.atlassian.crowd.directory.ldap.name
Interface Encoder

All Known Implementing Classes:
ActiveDirectoryEncoder, GenericEncoder

Deprecated. No longer used by GenericConverter.

public interface Encoder

Escapes special characters in names and/or DNs to make them suitable for LDAP-through-JNDI. Backslashes are a special character in both LDAP and JNDI, and so must be escaped twice. This means that a \ becomes \\\\ Other Ldap special characters are escaped with a single backslash. The characters in question are: \ + # = , < > An example escaped DN: cn=Smith\, John, dc=example, dc=org


Method Summary
 String dnEncode(String dn)
          Deprecated. Given a DN, escapes it for JNDI.
 String nameEncode(String name)
          Deprecated. Given a name, such as "Smith, John", returns a version escaped for Ldap and JNDI: "Smith\, John".
 

Method Detail

nameEncode

String nameEncode(String name)
Deprecated. 
Given a name, such as "Smith, John", returns a version escaped for Ldap and JNDI: "Smith\, John".

Parameters:
name -
Returns:

dnEncode

String dnEncode(String dn)
Deprecated. 
Given a DN, escapes it for JNDI. "cn=in \\ out, dc=example, dc=org" becomes "cn=in \\\\ out, dc=example, dc=org". Does not perform LDAP escaping.

Parameters:
dn -
Returns:


Copyright © 2013 Atlassian. All Rights Reserved.