Class FilterBasedLdapUserSearch
java.lang.Object
com.codename1.backend.security.ldap.FilterBasedLdapUserSearch
- All Implemented Interfaces:
LdapUserSearch
Finds a user by a filter under a search base, with the user name in place
of {0} -- escaped, so a name of * or x)(uid=* matches only itself.
new FilterBasedLdapUserSearch("ou=people", "(uid={0})", contextSource)
-
Constructor Summary
ConstructorsConstructorDescriptionFilterBasedLdapUserSearch(String searchBase, String searchFilter, LdapContextSource contextSource) -
Method Summary
Modifier and TypeMethodDescriptionsearchForUser(String username) The user's entry, or null when there is none.voidsetReturningAttributes(String... attributes) The attributes to read; all by default.voidsetSearchSubtree(boolean searchSubtree) Whether to look below the search base too; true by default, as Spring's.voidsetSearchTimeLimit(int seconds)
-
Constructor Details
-
FilterBasedLdapUserSearch
public FilterBasedLdapUserSearch(String searchBase, String searchFilter, LdapContextSource contextSource) - Parameters:
searchBase- relative to the context source's base; empty for the base itself
-
-
Method Details
-
setSearchSubtree
public void setSearchSubtree(boolean searchSubtree) Whether to look below the search base too; true by default, as Spring's. -
setReturningAttributes
The attributes to read; all by default. -
setSearchTimeLimit
public void setSearchTimeLimit(int seconds) -
searchForUser
Description copied from interface:LdapUserSearchThe user's entry, or null when there is none.- Specified by:
searchForUserin interfaceLdapUserSearch- Throws:
IOException- when the directory cannot be asked, or several entries match
-