Package edu.vt.middleware.ldap.auth
Class ConstructDnResolver
- java.lang.Object
-
- edu.vt.middleware.ldap.auth.ConstructDnResolver
-
- All Implemented Interfaces:
DnResolver,java.io.Serializable
public class ConstructDnResolver extends java.lang.Object implements DnResolver, java.io.Serializable
ConstructDnResolvercreates an LDAP DN using known information about the LDAP. Specifically it concatenates the first user field with the base DN.- Version:
- $Revision: 1632 $ $Date: 2010-09-29 00:42:24 +0200 (Wed, 29 Sep 2010) $
- Author:
- Middleware Services
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected AuthenticatorConfigconfigAuthentication configuration.protected org.apache.commons.logging.LogloggerLog for this class.
-
Constructor Summary
Constructors Constructor Description ConstructDnResolver()Default constructor.ConstructDnResolver(AuthenticatorConfig authConfig)This will create a newConstructDnResolverwith the suppliedAuthenticatorConfig.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()This will close any resources associated with this resolver.AuthenticatorConfiggetAuthenticatorConfig()This returns theAuthenticatorConfigof theAuthenticator.java.lang.Stringresolve(java.lang.String user)Creates a LDAP DN by combining the userField and the base dn.voidsetAuthenticatorConfig(AuthenticatorConfig authConfig)This will set the config parameters of thisAuthenticator.
-
-
-
Field Detail
-
logger
protected final org.apache.commons.logging.Log logger
Log for this class.
-
config
protected AuthenticatorConfig config
Authentication configuration.
-
-
Constructor Detail
-
ConstructDnResolver
public ConstructDnResolver()
Default constructor.
-
ConstructDnResolver
public ConstructDnResolver(AuthenticatorConfig authConfig)
This will create a newConstructDnResolverwith the suppliedAuthenticatorConfig.- Parameters:
authConfig-AuthenticatorConfig
-
-
Method Detail
-
setAuthenticatorConfig
public void setAuthenticatorConfig(AuthenticatorConfig authConfig)
This will set the config parameters of thisAuthenticator.- Specified by:
setAuthenticatorConfigin interfaceDnResolver- Parameters:
authConfig-AuthenticatorConfig
-
getAuthenticatorConfig
public AuthenticatorConfig getAuthenticatorConfig()
This returns theAuthenticatorConfigof theAuthenticator.- Specified by:
getAuthenticatorConfigin interfaceDnResolver- Returns:
AuthenticatorConfig
-
resolve
public java.lang.String resolve(java.lang.String user) throws javax.naming.NamingExceptionCreates a LDAP DN by combining the userField and the base dn.- Specified by:
resolvein interfaceDnResolver- Parameters:
user-Stringto find dn for- Returns:
String- user's dn- Throws:
javax.naming.NamingException- if the LDAP search fails
-
close
public void close()
This will close any resources associated with this resolver.- Specified by:
closein interfaceDnResolver
-
-