@Service public class LdapAuthenticator extends AbstractAuthenticator
<authenticator url="ldap:url=ldap://localhost:389">
</authenticator>
_passwordDigest, _passwordDigestAlgorithm, _passwordDigestRealm, NULL_USER
Constructor and Description |
---|
LdapAuthenticator() |
Modifier and Type | Method and Description |
---|---|
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) |
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
public void setDNPrefix(java.lang.String prefix)
public void setDNSuffix(java.lang.String suffix)
public void setBaseDn(java.lang.String baseDn)
public void setHost(java.lang.String host)
public void addJNDIEnv(InitParam init)
public void setURL(java.lang.String url)
public void setUserAttribute(java.lang.String user)
public void setPasswordAttribute(java.lang.String password)
public void setRoleAttribute(java.lang.String role)
public void setSecurityAuthentication(java.lang.String type)
public void setSecurityPrincipal(java.lang.String user)
public void setSecurityCredentials(java.lang.String password)
@PostConstruct public void init() throws ServletException
init
in class AbstractAuthenticator
ServletException
protected PasswordUser getPasswordUser(java.lang.String userName)
getPasswordUser
in class AbstractAuthenticator
userName
- the string user name