edu.vt.middleware.ldap.auth
Class ConstructDnResolver

java.lang.Object
  extended by edu.vt.middleware.ldap.auth.ConstructDnResolver
All Implemented Interfaces:
DnResolver, Serializable

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.

Version:
$Revision: 1632 $ $Date: 2010-09-28 18:42:24 -0400 (Tue, 28 Sep 2010) $
Author:
Middleware Services
See Also:
Serialized Form

Field Summary
protected  AuthenticatorConfig config
          Authentication configuration.
protected  org.apache.commons.logging.Log logger
          Log for this class.
 
Constructor Summary
ConstructDnResolver()
          Default constructor.
ConstructDnResolver(AuthenticatorConfig authConfig)
          This will create a new ConstructDnResolver with the supplied AuthenticatorConfig.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 new ConstructDnResolver with the supplied AuthenticatorConfig.

Parameters:
authConfig - AuthenticatorConfig
Method Detail

setAuthenticatorConfig

public void setAuthenticatorConfig(AuthenticatorConfig authConfig)
This will set the config parameters of this Authenticator.

Specified by:
setAuthenticatorConfig in interface DnResolver
Parameters:
authConfig - AuthenticatorConfig

getAuthenticatorConfig

public AuthenticatorConfig getAuthenticatorConfig()
This returns the AuthenticatorConfig of the Authenticator.

Specified by:
getAuthenticatorConfig in interface DnResolver
Returns:
AuthenticatorConfig

resolve

public String resolve(String user)
               throws NamingException
Creates a LDAP DN by combining the userField and the base dn.

Specified by:
resolve in interface DnResolver
Parameters:
user - String to find dn for
Returns:
String - user's dn
Throws:
NamingException - if the LDAP search fails

close

public void close()
This will close any resources associated with this resolver.

Specified by:
close in interface DnResolver


Copyright © 2003-2010 Virginia Tech. All Rights Reserved.