Package org.pac4j.ldap.profile.service
Class LdapProfileService
java.lang.Object
org.pac4j.core.util.InitializableObject
org.pac4j.core.profile.definition.ProfileDefinitionAware
org.pac4j.core.profile.service.AbstractProfileService<LdapProfile>
org.pac4j.ldap.profile.service.LdapProfileService
- All Implemented Interfaces:
org.pac4j.core.credentials.authenticator.Authenticator
,org.pac4j.core.profile.service.ProfileService<LdapProfile>
public class LdapProfileService
extends org.pac4j.core.profile.service.AbstractProfileService<LdapProfile>
The LDAP profile service (which supersedes the LDAP authenticator).
Notice that binary attributes are not supported.
- Since:
- 2.0.0
- Author:
- Jerome Leleu
-
Field Summary
Fields inherited from class org.pac4j.core.profile.service.AbstractProfileService
attributeNames, ID, LINKEDID, logger, SERIALIZED_PROFILE
-
Constructor Summary
ConstructorDescriptionLdapProfileService
(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) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
deleteById
(String id) getAttributesFromEntry
(org.ldaptive.LdapEntry entry) org.ldaptive.ConnectionFactory
protected String
getEntryId
(Map<String, Object> attributes) protected List<org.ldaptive.LdapAttribute>
getLdapAttributes
(Map<String, Object> attributes) org.ldaptive.auth.Authenticator
protected void
protected void
internalInit
(boolean forceReinit) void
setConnectionFactory
(org.ldaptive.ConnectionFactory connectionFactory) void
setLdapAuthenticator
(org.ldaptive.auth.Authenticator ldapAuthenticator) void
setUsersDn
(String usersDn) toString()
protected void
void
validate
(org.pac4j.core.credentials.Credentials cred, org.pac4j.core.context.WebContext context, org.pac4j.core.context.session.SessionStore sessionStore) Methods inherited from class org.pac4j.core.profile.service.AbstractProfileService
convertAttributesToProfile, convertProfileAndPasswordToAttributes, create, defineAttributesToRead, findById, findByLinkedId, getAttributes, getIdAttribute, getPasswordAttribute, getPasswordEncoder, getSerializer, getUsernameAttribute, isLegacyMode, remove, removeById, setAttributes, setIdAttribute, setPasswordAttribute, setPasswordEncoder, setSerializer, setUsernameAttribute, update
Methods inherited from class org.pac4j.core.profile.definition.ProfileDefinitionAware
defaultProfileDefinition, getProfileDefinition, setProfileDefinition
Methods inherited from class org.pac4j.core.util.InitializableObject
afterInternalInit, beforeInternalInit, getLastAttempt, getMaxAttempts, getMinTimeIntervalBetweenAttemptsInMilliseconds, getNbAttempts, init, init, isInitialized, reinit, setMaxAttempts, setMinTimeIntervalBetweenAttemptsInMilliseconds, shouldInitialize
-
Constructor Details
-
LdapProfileService
public LdapProfileService() -
LdapProfileService
public LdapProfileService(org.ldaptive.auth.Authenticator ldapAuthenticator) -
LdapProfileService
-
LdapProfileService
public LdapProfileService(org.ldaptive.ConnectionFactory connectionFactory, org.ldaptive.auth.Authenticator ldapAuthenticator, String usersDn) -
LdapProfileService
-
-
Method Details
-
internalInit
protected void internalInit(boolean forceReinit) - Overrides:
internalInit
in classorg.pac4j.core.profile.service.AbstractProfileService<LdapProfile>
-
insert
- Specified by:
insert
in classorg.pac4j.core.profile.service.AbstractProfileService<LdapProfile>
-
getEntryId
-
getLdapAttributes
-
update
- Specified by:
update
in classorg.pac4j.core.profile.service.AbstractProfileService<LdapProfile>
-
deleteById
- Specified by:
deleteById
in classorg.pac4j.core.profile.service.AbstractProfileService<LdapProfile>
-
read
- Specified by:
read
in classorg.pac4j.core.profile.service.AbstractProfileService<LdapProfile>
-
getAttributesFromEntry
-
validate
public void validate(org.pac4j.core.credentials.Credentials cred, org.pac4j.core.context.WebContext context, org.pac4j.core.context.session.SessionStore sessionStore) - Specified by:
validate
in interfaceorg.pac4j.core.credentials.authenticator.Authenticator
- Overrides:
validate
in classorg.pac4j.core.profile.service.AbstractProfileService<LdapProfile>
-
getConnectionFactory
public org.ldaptive.ConnectionFactory getConnectionFactory() -
setConnectionFactory
public void setConnectionFactory(org.ldaptive.ConnectionFactory connectionFactory) -
getUsersDn
-
setUsersDn
-
getLdapAuthenticator
public org.ldaptive.auth.Authenticator getLdapAuthenticator() -
setLdapAuthenticator
public void setLdapAuthenticator(org.ldaptive.auth.Authenticator ldapAuthenticator) -
toString
-