Package com.axelor.auth.pac4j.ldap
Class AxelorLdapProfileService
java.lang.Object
org.pac4j.core.util.InitializableObject
org.pac4j.core.profile.definition.ProfileDefinitionAware
org.pac4j.core.profile.service.AbstractProfileService<org.pac4j.ldap.profile.LdapProfile>
org.pac4j.ldap.profile.service.LdapProfileService
com.axelor.auth.pac4j.ldap.AxelorLdapProfileService
- All Implemented Interfaces:
Closeable,AutoCloseable,org.pac4j.core.credentials.authenticator.Authenticator,org.pac4j.core.profile.service.ProfileService<org.pac4j.ldap.profile.LdapProfile>
@Singleton
public class AxelorLdapProfileService
extends org.pac4j.ldap.profile.service.LdapProfileService
implements Closeable
-
Field Summary
FieldsFields inherited from class org.pac4j.core.profile.service.AbstractProfileService
attributeNames, ID, LINKEDID, SERIALIZED_PROFILEFields inherited from interface org.pac4j.core.credentials.authenticator.Authenticator
ALWAYS_VALIDATE, NEVER_VALIDATE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected org.pac4j.ldap.profile.LdapProfileprotected List<org.ldaptive.LdapAttribute> getLdapAttributes(Map<String, Object> attributes) protected org.ldaptive.sasl.SaslConfiggetSaslConfig(String authenticationType) protected voidinternalInit(boolean forceReinit) protected voidonAppShutdown(ShutdownEvent event) protected voidsearchAndSetAttributes(org.pac4j.ldap.profile.LdapProfile profile) org.ldaptive.LdapEntrysearchGroup(String groupName) protected voidsetGroup(org.pac4j.ldap.profile.LdapProfile profile) protected Stringprotected voidsetRoles(org.pac4j.ldap.profile.LdapProfile profile) protected booleanshouldInitialize(boolean forceReinit) Optional<org.pac4j.core.credentials.Credentials> validate(org.pac4j.core.context.CallContext ctx, org.pac4j.core.credentials.Credentials credentials) Methods inherited from class org.pac4j.ldap.profile.service.LdapProfileService
deleteById, getAttributesFromEntry, getConnectionFactory, getEntryId, getLdapAuthenticator, getUsersDn, insert, read, setConnectionFactory, setLdapAuthenticator, setUsersDn, toString, updateMethods inherited from class org.pac4j.core.profile.service.AbstractProfileService
convertProfileAndPasswordToAttributes, create, defineAttributesToRead, findById, findByLinkedId, getAttributes, getIdAttribute, getPasswordAttribute, getPasswordEncoder, getSerializer, getUsernameAttribute, isLegacyMode, remove, removeById, setAttributes, setIdAttribute, setPasswordAttribute, setPasswordEncoder, setSerializer, setUsernameAttribute, updateMethods inherited from class org.pac4j.core.profile.definition.ProfileDefinitionAware
getProfileDefinition, setProfileDefinition, setProfileDefinitionIfUndefinedMethods inherited from class org.pac4j.core.util.InitializableObject
afterInternalInit, beforeInternalInit, getInitialized, getLastAttempt, getMaxAttempts, getMinTimeIntervalBetweenAttemptsInMilliseconds, getNbAttempts, init, init, isInitialized, reinit, setMaxAttempts, setMinTimeIntervalBetweenAttemptsInMilliseconds
-
Field Details
-
FILTER_FORMAT
- See Also:
-
logger
protected final org.slf4j.Logger logger
-
-
Constructor Details
-
AxelorLdapProfileService
@Inject public AxelorLdapProfileService() -
AxelorLdapProfileService
-
-
Method Details
-
onAppShutdown
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
shouldInitialize
protected boolean shouldInitialize(boolean forceReinit) - Overrides:
shouldInitializein classorg.pac4j.core.util.InitializableObject
-
internalInit
protected void internalInit(boolean forceReinit) - Overrides:
internalInitin classorg.pac4j.ldap.profile.service.LdapProfileService
-
validate
public Optional<org.pac4j.core.credentials.Credentials> validate(org.pac4j.core.context.CallContext ctx, org.pac4j.core.credentials.Credentials credentials) - Specified by:
validatein interfaceorg.pac4j.core.credentials.authenticator.Authenticator- Overrides:
validatein classorg.pac4j.ldap.profile.service.LdapProfileService
-
getGroupsDn
-
getGroupFilter
-
searchGroup
-
getSaslConfig
-
convertAttributesToProfile
protected org.pac4j.ldap.profile.LdapProfile convertAttributesToProfile(List<Map<String, Object>> listStorageAttributes, String username) - Overrides:
convertAttributesToProfilein classorg.pac4j.core.profile.service.AbstractProfileService<org.pac4j.ldap.profile.LdapProfile>
-
searchAndSetAttributes
protected void searchAndSetAttributes(org.pac4j.ldap.profile.LdapProfile profile) -
setGroup
protected void setGroup(org.pac4j.ldap.profile.LdapProfile profile) -
setGroup
@Nullable protected String setGroup(org.pac4j.ldap.profile.LdapProfile profile, String filter) throws org.ldaptive.LdapException - Throws:
org.ldaptive.LdapException
-
setRoles
protected void setRoles(org.pac4j.ldap.profile.LdapProfile profile) -
getLdapAttributes
- Overrides:
getLdapAttributesin classorg.pac4j.ldap.profile.service.LdapProfileService
-