Class DefaultLdapSearchService
java.lang.Object
io.micronaut.security.ldap.context.DefaultLdapSearchService
- All Implemented Interfaces:
 LdapSearchService
Default implementation of 
LdapSearchService.- Since:
 - 1.0
 - Author:
 - James Kleeh
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected List<LdapSearchResult>createResults(NamingEnumeration<SearchResult> results) BuildsLdapSearchResultfrom the LDAP results.search(DirContext managerContext, SearchSettings settings) Searches LDAP with th e given settings and returns a list of results.searchFirst(DirContext managerContext, SearchSettings settings) Searches LDAP with the given settings and returns an optional result. 
- 
Constructor Details
- 
DefaultLdapSearchService
public DefaultLdapSearchService() 
 - 
 - 
Method Details
- 
searchFirst
public Optional<LdapSearchResult> searchFirst(DirContext managerContext, SearchSettings settings) throws NamingException Description copied from interface:LdapSearchServiceSearches LDAP with the given settings and returns an optional result.- Specified by:
 searchFirstin interfaceLdapSearchService- Parameters:
 managerContext- The context to search withsettings- The settings for searching- Returns:
 - An optional search result
 - Throws:
 NamingException- If the search fails
 - 
search
public List<LdapSearchResult> search(DirContext managerContext, SearchSettings settings) throws NamingException Description copied from interface:LdapSearchServiceSearches LDAP with th e given settings and returns a list of results.- Specified by:
 searchin interfaceLdapSearchService- Parameters:
 managerContext- The context to search withsettings- The settings for searching- Returns:
 - A list of results, empty if none found
 - Throws:
 NamingException- If the search fails
 - 
createResults
protected List<LdapSearchResult> createResults(NamingEnumeration<SearchResult> results) throws NamingException BuildsLdapSearchResultfrom the LDAP results.- Parameters:
 results- The LDAP results- Returns:
 - The list of 
LdapSearchResult - Throws:
 NamingException- If an error occurs
 
 -