public class LdapAuthenticator extends InitializableWebObject implements UsernamePasswordAuthenticator
Authenticator
class.
It creates the user profile and stores it in the credentials for the AuthenticatorProfileCreator
.Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger |
Constructor and Description |
---|
LdapAuthenticator() |
LdapAuthenticator(org.ldaptive.auth.Authenticator ldapAuthenticator) |
LdapAuthenticator(org.ldaptive.auth.Authenticator ldapAuthenticator,
String attributes) |
Modifier and Type | Method and Description |
---|---|
protected LdapProfile |
createProfile(String username,
String[] ldapAttributes,
org.ldaptive.LdapEntry entry) |
String |
getAttributes() |
org.ldaptive.auth.Authenticator |
getLdapAuthenticator() |
protected void |
internalInit(WebContext context)
Internal initialization of the object.
|
void |
setAttributes(String attributes) |
void |
setLdapAuthenticator(org.ldaptive.auth.Authenticator ldapAuthenticator) |
void |
validate(UsernamePasswordCredentials credentials,
WebContext context)
Validate the credentials.
|
init, reinit
public LdapAuthenticator()
public LdapAuthenticator(org.ldaptive.auth.Authenticator ldapAuthenticator)
public LdapAuthenticator(org.ldaptive.auth.Authenticator ldapAuthenticator, String attributes)
protected void internalInit(WebContext context)
InitializableWebObject
internalInit
in class InitializableWebObject
context
- the web contextpublic void validate(UsernamePasswordCredentials credentials, WebContext context) throws HttpAction
Authenticator
CredentialsException
in case of failure.validate
in interface Authenticator<UsernamePasswordCredentials>
validate
in interface UsernamePasswordAuthenticator
credentials
- the given credentialscontext
- the web contextHttpAction
- requires a specific HTTP action if necessaryprotected LdapProfile createProfile(String username, String[] ldapAttributes, org.ldaptive.LdapEntry entry)
public org.ldaptive.auth.Authenticator getLdapAuthenticator()
public void setLdapAuthenticator(org.ldaptive.auth.Authenticator ldapAuthenticator)
public String getAttributes()
public void setAttributes(String attributes)
Copyright © 2016. All rights reserved.