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

    Fields
    Modifier and Type
    Field
    Description
    protected static final String
     
    protected final org.slf4j.Logger
     

    Fields inherited from class org.pac4j.core.profile.service.AbstractProfileService

    attributeNames, ID, LINKEDID, SERIALIZED_PROFILE

    Fields inherited from interface org.pac4j.core.credentials.authenticator.Authenticator

    ALWAYS_VALIDATE, NEVER_VALIDATE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected org.pac4j.ldap.profile.LdapProfile
    convertAttributesToProfile(List<Map<String,Object>> listStorageAttributes, String username)
     
     
     
    protected List<org.ldaptive.LdapAttribute>
     
    protected org.ldaptive.sasl.SaslConfig
    getSaslConfig(String authenticationType)
     
    protected void
    internalInit(boolean forceReinit)
     
    protected void
     
    protected void
    searchAndSetAttributes(org.pac4j.ldap.profile.LdapProfile profile)
     
    org.ldaptive.LdapEntry
    searchGroup(String groupName)
     
    protected void
    setGroup(org.pac4j.ldap.profile.LdapProfile profile)
     
    protected String
    setGroup(org.pac4j.ldap.profile.LdapProfile profile, String filter)
     
    protected void
    setRoles(org.pac4j.ldap.profile.LdapProfile profile)
     
    protected boolean
    shouldInitialize(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, update

    Methods 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, update

    Methods inherited from class org.pac4j.core.profile.definition.ProfileDefinitionAware

    getProfileDefinition, setProfileDefinition, setProfileDefinitionIfUndefined

    Methods inherited from class org.pac4j.core.util.InitializableObject

    afterInternalInit, beforeInternalInit, getInitialized, getLastAttempt, getMaxAttempts, getMinTimeIntervalBetweenAttemptsInMilliseconds, getNbAttempts, init, init, isInitialized, reinit, setMaxAttempts, setMinTimeIntervalBetweenAttemptsInMilliseconds

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • FILTER_FORMAT

      protected static final String FILTER_FORMAT
      See Also:
    • logger

      protected final org.slf4j.Logger logger
  • Constructor Details

    • AxelorLdapProfileService

      @Inject public AxelorLdapProfileService()
    • AxelorLdapProfileService

      public AxelorLdapProfileService(Map<String,String> properties)
  • Method Details

    • onAppShutdown

      protected void onAppShutdown(ShutdownEvent event)
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • shouldInitialize

      protected boolean shouldInitialize(boolean forceReinit)
      Overrides:
      shouldInitialize in class org.pac4j.core.util.InitializableObject
    • internalInit

      protected void internalInit(boolean forceReinit)
      Overrides:
      internalInit in class org.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:
      validate in interface org.pac4j.core.credentials.authenticator.Authenticator
      Overrides:
      validate in class org.pac4j.ldap.profile.service.LdapProfileService
    • getGroupsDn

      public String getGroupsDn()
    • getGroupFilter

      public String getGroupFilter()
    • searchGroup

      @Nullable public org.ldaptive.LdapEntry searchGroup(String groupName)
    • getSaslConfig

      @Nullable protected org.ldaptive.sasl.SaslConfig getSaslConfig(String authenticationType)
    • convertAttributesToProfile

      protected org.pac4j.ldap.profile.LdapProfile convertAttributesToProfile(List<Map<String,Object>> listStorageAttributes, String username)
      Overrides:
      convertAttributesToProfile in class org.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

      protected List<org.ldaptive.LdapAttribute> getLdapAttributes(Map<String,Object> attributes)
      Overrides:
      getLdapAttributes in class org.pac4j.ldap.profile.service.LdapProfileService