public class LdapProfileService extends AbstractProfileService<LdapProfile>
attributeNames, ID, LINKEDID, logger, SERIALIZED_PROFILE
Constructor and Description |
---|
LdapProfileService() |
LdapProfileService(org.ldaptive.auth.Authenticator ldapAuthenticator) |
LdapProfileService(org.ldaptive.auth.Authenticator ldapAuthenticator,
String attributes) |
LdapProfileService(org.ldaptive.ConnectionFactory connectionFactory,
org.ldaptive.auth.Authenticator ldapAuthenticator,
String usersDn) |
LdapProfileService(org.ldaptive.ConnectionFactory connectionFactory,
org.ldaptive.auth.Authenticator ldapAuthenticator,
String attributes,
String usersDn) |
Modifier and Type | Method and Description |
---|---|
protected void |
deleteById(String id)
Delete a profile by its identifier in the storage.
|
protected Map<String,Object> |
getAttributesFromEntry(org.ldaptive.LdapEntry entry) |
org.ldaptive.ConnectionFactory |
getConnectionFactory() |
protected String |
getEntryId(Map<String,Object> attributes) |
protected List<org.ldaptive.LdapAttribute> |
getLdapAttributes(Map<String,Object> attributes) |
org.ldaptive.auth.Authenticator |
getLdapAuthenticator() |
String |
getUsersDn() |
protected void |
insert(Map<String,Object> attributes)
Insert the attributes in the storage.
|
protected void |
internalInit(WebContext context)
Internal initialization of the object.
|
protected List<Map<String,Object>> |
read(List<String> names,
String key,
String value)
Read the list of defined attributes in the storage for key=value query.
|
void |
setConnectionFactory(org.ldaptive.ConnectionFactory connectionFactory) |
void |
setLdapAuthenticator(org.ldaptive.auth.Authenticator ldapAuthenticator) |
void |
setUsersDn(String usersDn) |
String |
toString() |
protected void |
update(Map<String,Object> attributes)
Update the attributes in the storage.
|
void |
validate(UsernamePasswordCredentials credentials,
WebContext context)
Validate the credentials.
|
convertAttributesToProfile, convertProfileAndPasswordToAttributes, create, defineAttributesToRead, findById, findByLinkedId, getAttributes, getIdAttribute, getJavaSerializationHelper, getPasswordAttribute, getPasswordEncoder, getUsernameAttribute, isLegacyMode, remove, removeById, setAttributes, setIdAttribute, setJavaSerializationHelper, setPasswordAttribute, setPasswordEncoder, setUsernameAttribute, update
defaultProfileDefinition, getProfileDefinition, setProfileDefinition
init, reinit
public LdapProfileService()
public LdapProfileService(org.ldaptive.auth.Authenticator ldapAuthenticator)
public LdapProfileService(org.ldaptive.auth.Authenticator ldapAuthenticator, String attributes)
public LdapProfileService(org.ldaptive.ConnectionFactory connectionFactory, org.ldaptive.auth.Authenticator ldapAuthenticator, String usersDn)
protected void internalInit(WebContext context)
InitializableWebObject
internalInit
in class AbstractProfileService<LdapProfile>
context
- the web contextprotected void insert(Map<String,Object> attributes)
AbstractProfileService
insert
in class AbstractProfileService<LdapProfile>
attributes
- the attributesprotected List<org.ldaptive.LdapAttribute> getLdapAttributes(Map<String,Object> attributes)
protected void update(Map<String,Object> attributes)
AbstractProfileService
update
in class AbstractProfileService<LdapProfile>
attributes
- the attributesprotected void deleteById(String id)
AbstractProfileService
deleteById
in class AbstractProfileService<LdapProfile>
id
- the identifierprotected List<Map<String,Object>> read(List<String> names, String key, String value)
AbstractProfileService
read
in class AbstractProfileService<LdapProfile>
names
- the attribute names to readkey
- the key for the queryvalue
- the value for the queryprotected Map<String,Object> getAttributesFromEntry(org.ldaptive.LdapEntry entry)
public void validate(UsernamePasswordCredentials credentials, WebContext context) throws HttpAction, CredentialsException
Authenticator
CredentialsException
in case of failure.validate
in interface Authenticator<UsernamePasswordCredentials>
validate
in class AbstractProfileService<LdapProfile>
credentials
- the given credentialscontext
- the web contextHttpAction
- requires a specific HTTP action if necessaryCredentialsException
- the credentials are invalidpublic org.ldaptive.ConnectionFactory getConnectionFactory()
public void setConnectionFactory(org.ldaptive.ConnectionFactory connectionFactory)
public String getUsersDn()
public void setUsersDn(String usersDn)
public org.ldaptive.auth.Authenticator getLdapAuthenticator()
public void setLdapAuthenticator(org.ldaptive.auth.Authenticator ldapAuthenticator)
Copyright © 2017. All rights reserved.