com.caucho.server.security
Class LdapAuthenticator

java.lang.Object
  extended by com.caucho.server.security.AbstractAuthenticator
      extended by com.caucho.server.security.AbstractPasswordAuthenticator
          extended by com.caucho.server.security.LdapAuthenticator
All Implemented Interfaces:
ServletAuthenticator, HandleAware, java.io.Serializable

public class LdapAuthenticator
extends AbstractPasswordAuthenticator

The LDAP authenticator uses the underlying LDAP services provided by the JDK.

 <authenticator url="ldap:url=ldap://localhost:389">
 </authenticator>
 

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.caucho.server.security.AbstractAuthenticator
_passwordDigest, _passwordDigestAlgorithm, _passwordDigestRealm, _principalCache, _principalCacheSize, LOGIN_NAME
 
Constructor Summary
LdapAuthenticator()
           
 
Method Summary
 void addJNDIEnv(InitParam init)
           
protected  PasswordUser getUser(java.lang.String userName)
          Authenticate (login) the user.
 void init()
          Initialize the authenticator.
 void setBaseDn(java.lang.String baseDn)
           
 void setDNPrefix(java.lang.String prefix)
           
 void setDNSuffix(java.lang.String suffix)
           
 void setHost(java.lang.String host)
           
 void setPasswordAttribute(java.lang.String password)
           
 void setSecurityAuthentication(java.lang.String type)
          Sets the Context.SECURITY_AUTHENTICATION
 void setSecurityCredentials(java.lang.String password)
          Sets the Context.SECURITY_CREDENTIALS
 void setSecurityPrincipal(java.lang.String user)
          Sets the Context.SECURITY_PRINCIPAL
 void setURL(java.lang.String url)
           
 void setUserAttribute(java.lang.String user)
           
 
Methods inherited from class com.caucho.server.security.AbstractPasswordAuthenticator
getDigestPassword, getUser, isUserInRole, loginImpl
 
Methods inherited from class com.caucho.server.security.AbstractAuthenticator
addRoleMapping, digest, getDigestSecret, getLogoutOnSessionTimeout, getPasswordDigest, getPasswordDigest, getPasswordDigestAlgorithm, getPasswordDigestRealm, getPrincipalCacheSize, getUserPrincipal, getUserPrincipalImpl, login, loginDigest, loginDigestImpl, logout, logout, logout, setLogoutOnSessionTimeout, setPasswordDigest, setPasswordDigestAlgorithm, setPasswordDigestRealm, setPrincipalCacheSize, setSerializationHandle, stringToDigest, toString, writeReplace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LdapAuthenticator

public LdapAuthenticator()
Method Detail

setDNPrefix

public void setDNPrefix(java.lang.String prefix)

setDNSuffix

public void setDNSuffix(java.lang.String suffix)

setBaseDn

public void setBaseDn(java.lang.String baseDn)

setHost

public void setHost(java.lang.String host)

addJNDIEnv

public void addJNDIEnv(InitParam init)

setURL

public void setURL(java.lang.String url)

setUserAttribute

public void setUserAttribute(java.lang.String user)

setPasswordAttribute

public void setPasswordAttribute(java.lang.String password)

setSecurityAuthentication

public void setSecurityAuthentication(java.lang.String type)
Sets the Context.SECURITY_AUTHENTICATION


setSecurityPrincipal

public void setSecurityPrincipal(java.lang.String user)
Sets the Context.SECURITY_PRINCIPAL


setSecurityCredentials

public void setSecurityCredentials(java.lang.String password)
Sets the Context.SECURITY_CREDENTIALS


init

public void init()
          throws ServletException
Initialize the authenticator.

Specified by:
init in interface ServletAuthenticator
Overrides:
init in class AbstractAuthenticator
Throws:
ServletException

getUser

protected PasswordUser getUser(java.lang.String userName)
Authenticate (login) the user.

Specified by:
getUser in class AbstractPasswordAuthenticator
Parameters:
userName - the string user name
Returns:
the populated PasswordUser value