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
ConstructDnResolver
creates 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 AuthenticatorConfig
config
Authentication configuration.protected org.apache.commons.logging.Log
logger
Log for this class.
-
Constructor Summary
Constructors Constructor Description ConstructDnResolver()
Default constructor.ConstructDnResolver(AuthenticatorConfig authConfig)
This will create a newConstructDnResolver
with the suppliedAuthenticatorConfig
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
This will close any resources associated with this resolver.AuthenticatorConfig
getAuthenticatorConfig()
This returns theAuthenticatorConfig
of theAuthenticator
.java.lang.String
resolve(java.lang.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 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 newConstructDnResolver
with the suppliedAuthenticatorConfig
.- Parameters:
authConfig
-AuthenticatorConfig
-
-
Method Detail
-
setAuthenticatorConfig
public void setAuthenticatorConfig(AuthenticatorConfig authConfig)
This will set the config parameters of thisAuthenticator
.- Specified by:
setAuthenticatorConfig
in interfaceDnResolver
- Parameters:
authConfig
-AuthenticatorConfig
-
getAuthenticatorConfig
public AuthenticatorConfig getAuthenticatorConfig()
This returns theAuthenticatorConfig
of theAuthenticator
.- Specified by:
getAuthenticatorConfig
in interfaceDnResolver
- Returns:
AuthenticatorConfig
-
resolve
public java.lang.String resolve(java.lang.String user) throws javax.naming.NamingException
Creates a LDAP DN by combining the userField and the base dn.- Specified by:
resolve
in interfaceDnResolver
- Parameters:
user
-String
to 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:
close
in interfaceDnResolver
-
-