public class CompareAuthenticationHandler extends AbstractAuthenticationHandler
CompareAuthenticationHandler
provides an LDAP authentication
implementation that leverages a compare operation against the userPassword
attribute. The default password scheme used is 'SHA'.config, logger
Constructor and Description |
---|
CompareAuthenticationHandler()
Default constructor.
|
CompareAuthenticationHandler(AuthenticatorConfig ac)
Creates a new
CompareAuthenticationHandler with the supplied
authenticator config. |
Modifier and Type | Method and Description |
---|---|
void |
authenticate(ConnectionHandler ch,
AuthenticationCriteria ac)
Perform an ldap authentication.
|
String |
getPasswordScheme()
Returns the password scheme.
|
CompareAuthenticationHandler |
newInstance()
Returns a separate instance of this authentication handler.
|
void |
setPasswordScheme(String s)
Sets the password scheme.
|
setAuthenticatorConfig
public CompareAuthenticationHandler()
public CompareAuthenticationHandler(AuthenticatorConfig ac)
CompareAuthenticationHandler
with the supplied
authenticator config.ac
- authenticator configpublic String getPasswordScheme()
public void setPasswordScheme(String s)
s
- password schemepublic void authenticate(ConnectionHandler ch, AuthenticationCriteria ac) throws NamingException
AuthenticationException
to indicate an authentication failure. The
resulting LdapContext
can be retrieved from the connection
handler if it is needed.authenticate
in interface AuthenticationHandler
authenticate
in class AbstractAuthenticationHandler
ch
- ConnectionHandler
to communicate with the LDAPac
- AuthenticationCriteria
to perform the
authentication withNamingException
- if an LDAP error occurspublic CompareAuthenticationHandler newInstance()
newInstance
in interface AuthenticationHandler
newInstance
in class AbstractAuthenticationHandler
Copyright © 2019. All rights reserved.