public class ConstructDnResolver extends Object implements DnResolver, Serializable
ConstructDnResolver creates an LDAP DN using known information
about the LDAP. Specifically it concatenates the first user field with the
base DN.| Modifier and Type | Field and Description |
|---|---|
protected AuthenticatorConfig |
config
Authentication configuration.
|
protected org.apache.commons.logging.Log |
logger
Log for this class.
|
| Constructor and Description |
|---|
ConstructDnResolver()
Default constructor.
|
ConstructDnResolver(AuthenticatorConfig authConfig)
This will create a new
ConstructDnResolver with the supplied
AuthenticatorConfig. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
This will close any resources associated with this resolver.
|
AuthenticatorConfig |
getAuthenticatorConfig()
This returns the
AuthenticatorConfig of the
Authenticator. |
String |
resolve(String user)
Creates a LDAP DN by combining the userField and the base dn.
|
void |
setAuthenticatorConfig(AuthenticatorConfig authConfig)
This will set the config parameters of this
Authenticator. |
protected final org.apache.commons.logging.Log logger
protected AuthenticatorConfig config
public ConstructDnResolver()
public ConstructDnResolver(AuthenticatorConfig authConfig)
ConstructDnResolver 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
resolve in interface DnResolveruser - String to find dn forString - user's dnNamingException - if the LDAP search failspublic void close()
close in interface DnResolverCopyright © 2014. All rights reserved.