Package io.jmix.ldap.search
Class JmixFilterBasedLdapUserSearch
java.lang.Object
io.jmix.ldap.search.JmixFilterBasedLdapUserSearch
- All Implemented Interfaces:
- JmixLdapUserSearch,- org.springframework.security.ldap.search.LdapUserSearch
Mostly copied from 
FilterBasedLdapUserSearch in order to add searchForUsersBySubstring(java.lang.String) method.- 
Constructor SummaryConstructorsConstructorDescriptionJmixFilterBasedLdapUserSearch(String searchBase, String userSearchFilter, org.springframework.ldap.core.support.BaseLdapPathContextSource contextSource) 
- 
Method SummaryModifier and TypeMethodDescriptionorg.springframework.ldap.core.DirContextOperationssearchForUser(String username) Return the LdapUserDetails containing the user's informationSet<org.springframework.ldap.core.DirContextOperations>searchForUsersBySubstring(String substring) Locates multiple user in the directory by the given substring and returns the LDAP information for those users.voidsetDerefLinkFlag(boolean deref) Sets the corresponding property on theSearchControlsinstance used in the search.voidsetReturningAttributes(String[] attrs) Specifies the attributes that will be returned as part of the search.voidsetSearchSubtree(boolean searchSubtree) If true then searches the entire subtree as identified by context, if false (the default) then only searches the level identified by the context.voidsetSearchTimeLimit(int searchTimeLimit) The time to wait before the search fails; the default is zero, meaning forever.toString()
- 
Constructor Details- 
JmixFilterBasedLdapUserSearch
 
- 
- 
Method Details- 
searchForUserReturn the LdapUserDetails containing the user's information- Specified by:
- searchForUserin interface- org.springframework.security.ldap.search.LdapUserSearch
- Parameters:
- username- the username to search for.
- Returns:
- An LdapUserDetails object containing the details of the located user's directory entry
- Throws:
- org.springframework.security.core.userdetails.UsernameNotFoundException- if no matching entry is found.
 
- 
searchForUsersBySubstringpublic Set<org.springframework.ldap.core.DirContextOperations> searchForUsersBySubstring(String substring) Description copied from interface:JmixLdapUserSearchLocates multiple user in the directory by the given substring and returns the LDAP information for those users.- Specified by:
- searchForUsersBySubstringin interface- JmixLdapUserSearch
- Parameters:
- substring- the substring of login name supplied to the authentication service.
- Returns:
- a set of DirContextOperations objects containing the user's full DN and requested attributes.
 
- 
setDerefLinkFlagpublic void setDerefLinkFlag(boolean deref) Sets the corresponding property on theSearchControlsinstance used in the search.- Parameters:
- deref- the derefLinkFlag value as defined in SearchControls..
 
- 
setSearchSubtreepublic void setSearchSubtree(boolean searchSubtree) If true then searches the entire subtree as identified by context, if false (the default) then only searches the level identified by the context.- Parameters:
- searchSubtree- true the underlying search controls should be set to SearchControls.SUBTREE_SCOPE rather than SearchControls.ONELEVEL_SCOPE.
 
- 
setSearchTimeLimitpublic void setSearchTimeLimit(int searchTimeLimit) The time to wait before the search fails; the default is zero, meaning forever.- Parameters:
- searchTimeLimit- the time limit for the search (in milliseconds).
 
- 
setReturningAttributesSpecifies the attributes that will be returned as part of the search.null indicates that all attributes will be returned. An empty array indicates no attributes are returned. - Parameters:
- attrs- An array of attribute names identifying the attributes that will be returned. Can be null.
 
- 
toString
 
-