public class SearchDnResolver extends AbstractLdap<AuthenticatorConfig> implements DnResolver, Serializable
SearchDnResolver looks up a user's DN using an LDAP search.BINDING_COPY_RESULT_HANDLER, config, connectionHandler, COPY_RESULT_HANDLER, logger, NCP_COPY_RESULT_HANDLER, SR_COPY_RESULT_HANDLER| Constructor and Description |
|---|
SearchDnResolver()
Default constructor.
|
SearchDnResolver(AuthenticatorConfig authConfig)
This will create a new
SearchDnResolver with the supplied
AuthenticatorConfig. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
This will close the connection to the LDAP.
|
AuthenticatorConfig |
getAuthenticatorConfig()
This returns the
AuthenticatorConfig of the
Authenticator. |
String |
resolve(String user)
This will attempt to find the dn for the supplied user.
|
void |
setAuthenticatorConfig(AuthenticatorConfig authConfig)
This will set the config parameters of this
Authenticator. |
compare, connect, create, delete, finalize, getAttributes, getContext, getSchema, list, listBindings, modifyAttributes, modifyAttributes, operationRetry, pagedSearch, reconnect, rename, search, searchAttributes, setLdapConfig, toStringpublic SearchDnResolver()
public SearchDnResolver(AuthenticatorConfig authConfig)
SearchDnResolver with the supplied
AuthenticatorConfig.authConfig - AuthenticatorConfigpublic void setAuthenticatorConfig(AuthenticatorConfig authConfig)
Authenticator.setAuthenticatorConfig in interface DnResolverauthConfig - AuthenticatorConfigpublic AuthenticatorConfig getAuthenticatorConfig()
AuthenticatorConfig of the
Authenticator.getAuthenticatorConfig in interface DnResolverAuthenticatorConfigpublic String resolve(String user) throws NamingException
AuthenticatorConfig.getUserFilter() or AuthenticatorConfig.getUserField() is used to look up the dn. If a filter
is used, the user is provided as the {0} variable filter argument. If a
field is used, the filter is built by ORing the fields together. If more
than one entry matches the search, the result is controlled by AuthenticatorConfig.setAllowMultipleDns(boolean).resolve in interface DnResolveruser - String to find dn forString - user's dnNamingException - if the LDAP search failspublic void close()
close in interface DnResolverclose in interface BaseLdapclose in class AbstractLdap<AuthenticatorConfig>Copyright © 2014. All rights reserved.