|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ldaptive.auth.AbstractSearchOperationFactory
org.ldaptive.auth.AbstractSearchEntryResolver
public abstract class AbstractSearchEntryResolver
Base implementation for search entry resolvers. Uses an object level search
on the AuthenticationCriteria.getDn() if no userFilter is
configured. If a userFilter is configured, then a search is executed
using that filter.
| Field Summary |
|---|
| Fields inherited from class org.ldaptive.auth.AbstractSearchOperationFactory |
|---|
logger |
| Constructor Summary | |
|---|---|
AbstractSearchEntryResolver()
|
|
| Method Summary | |
|---|---|
protected SearchFilter |
createSearchFilter(AuthenticationCriteria ac)
Returns a search filter using userFilter and userFilterParameters. |
protected SearchRequest |
createSearchRequest(AuthenticationCriteria ac)
Returns a search request for the supplied authentication criteria. |
protected SearchRequest |
createSearchRequest(AuthenticationCriteria ac,
String[] returnAttributes)
Deprecated. use createSearchRequest(AuthenticationCriteria) |
boolean |
getAllowMultipleEntries()
Returns whether entry resolution should fail if multiple entries are found. |
String |
getBaseDn()
Returns the base DN. |
DerefAliases |
getDerefAliases()
Returns how to dereference aliases. |
boolean |
getFollowReferrals()
Returns whether to follow referrals. |
String[] |
getReturnAttributes()
Deprecated. return attributes retrieved from the authentication request |
SearchEntryHandler[] |
getSearchEntryHandlers()
Returns the search entry handlers. |
boolean |
getSubtreeSearch()
Returns whether subtree searching will be used. |
String |
getUserFilter()
Returns the filter used to search for the user. |
Object[] |
getUserFilterParameters()
Returns the filter parameters used to search for the user. |
protected abstract SearchResult |
performLdapSearch(Connection conn,
AuthenticationCriteria ac)
Executes an ldap search with the supplied authentication criteria. |
LdapEntry |
resolve(Connection conn,
AuthenticationCriteria ac)
Attempts to find the LDAP entry for the supplied authentication criteria, using the supplied connection. |
void |
setAllowMultipleEntries(boolean b)
Sets whether entry resolution should fail if multiple entries are found. |
void |
setBaseDn(String dn)
Sets the base DN. |
void |
setDerefAliases(DerefAliases da)
Sets how to dereference aliases. |
void |
setFollowReferrals(boolean b)
Sets whether to follow referrals. |
void |
setReturnAttributes(String... attrs)
Deprecated. return attributes retrieved from the authentication request |
void |
setSearchEntryHandlers(SearchEntryHandler... handlers)
Sets the search entry handlers. |
void |
setSubtreeSearch(boolean b)
Sets whether subtree searching will be used. |
void |
setUserFilter(String filter)
Sets the filter used to search for the user. |
void |
setUserFilterParameters(Object[] filterParams)
Sets the filter parameters used to search for the user. |
| Methods inherited from class org.ldaptive.auth.AbstractSearchOperationFactory |
|---|
createSearchOperation, getSearchCache, getSearchExceptionHandler, getSearchResponseHandlers, setSearchCache, setSearchExceptionHandler, setSearchResponseHandlers |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractSearchEntryResolver()
| Method Detail |
|---|
public String getBaseDn()
public void setBaseDn(String dn)
dn - base DNpublic String getUserFilter()
public void setUserFilter(String filter)
filter - for searchingpublic Object[] getUserFilterParameters()
public void setUserFilterParameters(Object[] filterParams)
filterParams - filter parameterspublic boolean getAllowMultipleEntries()
public void setAllowMultipleEntries(boolean b)
resolve(Connection,
AuthenticationCriteria) finds more than one entry matching it's filter.
Otherwise the first entry found is returned.
b - whether multiple entries are allowedpublic boolean getSubtreeSearch()
public void setSubtreeSearch(boolean b)
getBaseDn(). Otherwise the entry will
be searched for in the getBaseDn() context.
b - whether the entry will be searched for over the entire basepublic DerefAliases getDerefAliases()
public void setDerefAliases(DerefAliases da)
da - how to dereference aliasespublic boolean getFollowReferrals()
public void setFollowReferrals(boolean b)
b - whether to follow referrals@Deprecated public String[] getReturnAttributes()
@Deprecated public void setReturnAttributes(String... attrs)
attrs - to returnpublic SearchEntryHandler[] getSearchEntryHandlers()
public void setSearchEntryHandlers(SearchEntryHandler... handlers)
handlers - search entry handlers
protected abstract SearchResult performLdapSearch(Connection conn,
AuthenticationCriteria ac)
throws LdapException
conn - that the user attempted to bind onac - authentication criteria associated with the user
LdapException - if an error occurs attempting the searchprotected SearchFilter createSearchFilter(AuthenticationCriteria ac)
userFilter and userFilterParameters. AuthenticationRequest.getUser() is injected
with a named parameter of 'user', AuthenticationCriteria.getDn() is
injected with a named parameter of 'dn'.
ac - authentication criteria
@Deprecated
protected SearchRequest createSearchRequest(AuthenticationCriteria ac,
String[] returnAttributes)
createSearchRequest(AuthenticationCriteria)
userFilter is defined then an object level search on the
authentication criteria DN is returned. Otherwise the userFilter,
baseDn and subtreeSearch are used to create the search
request.
ac - authentication criteria containing a DNreturnAttributes - to request
protected SearchRequest createSearchRequest(AuthenticationCriteria ac)
userFilter is defined then an object level search on the
authentication criteria DN is returned. Otherwise the userFilter,
baseDn and subtreeSearch are used to create the search
request.
ac - authentication criteria containing a DN
public LdapEntry resolve(Connection conn,
AuthenticationCriteria ac)
throws LdapException
resolve in interface EntryResolverconn - that authentication occurred onac - authentication criteria used to perform the
authentication
LdapException - if an LDAP error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||