com.caucho.security
Class LdapAuthenticator

java.lang.Object
  extended by com.caucho.security.AbstractAuthenticator
      extended by com.caucho.security.LdapAuthenticator
All Implemented Interfaces:
HandleAware, Authenticator, java.io.Serializable
Direct Known Subclasses:
LdapAuthenticator

@Service
public class LdapAuthenticator
extends AbstractAuthenticator

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.security.AbstractAuthenticator
_passwordDigest, _passwordDigestAlgorithm, _passwordDigestRealm
 
Constructor Summary
LdapAuthenticator()
           
 
Method Summary
 void addJNDIEnv(InitParam init)
           
protected  PasswordUser getPasswordUser(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 setRoleAttribute(java.lang.String role)
           
 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.security.AbstractAuthenticator
addRoleMapping, authenticate, authenticate, authenticate, authenticate, authenticate, digest, getAlgorithm, getDigest, getDigestSecret, getDigestSecret, getLogoutOnSessionTimeout, getPasswordDigest, getPasswordDigest, getPasswordDigestAlgorithm, getPasswordDigestRealm, getPasswordUser, getSingleSignon, isUserInRole, logout, setLogoutOnSessionTimeout, setPasswordDigest, setPasswordDigestAlgorithm, setPasswordDigestRealm, 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)

setRoleAttribute

public void setRoleAttribute(java.lang.String role)

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

@PostConstruct
public void init()
          throws ServletException
Initialize the authenticator.

Overrides:
init in class AbstractAuthenticator
Throws:
ServletException

getPasswordUser

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

Overrides:
getPasswordUser in class AbstractAuthenticator
Parameters:
userName - the string user name
Returns:
the populated PasswordUser value