Interface LdapEncoder
- All Known Implementing Classes:
LdapEncoder.LikeEncoder,LdapEncoder.NameEncoder
public interface LdapEncoder
Strategy interface to escape values for use in LDAP filters.
Accepts an LDAP filter value to be encoded (escaped) for String-based LDAP query usage as LDAP queries do not feature an out-of-band parameter binding mechanism.
Make sure that your implementation escapes special characters in the value adequately to prevent injection attacks.
- Since:
- 3.5
- Author:
- Marcin Grzejszczak, Mark Paluch
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classEscape a value for use in a filter retaining asterisks (*) for like/contains searches.static classLdapEncoderusingLdapEncoder.nameEncode(String). -
Method Summary
-
Method Details
-
encode
Encode a value for use in a filter.- Parameters:
value- the value to encode.- Returns:
- a properly encoded representation of the supplied value.
-