Class AxelorLdapProfileService

  • All Implemented Interfaces:
    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
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static String FILTER_FORMAT  
      protected org.slf4j.Logger 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.pac4j.ldap.profile.LdapProfile convertAttributesToProfile​(List<Map<String,​Object>> listStorageAttributes, String username)  
      String getGroupFilter()  
      String getGroupsDn()  
      protected List<org.ldaptive.LdapAttribute> getLdapAttributes​(Map<String,​Object> attributes)  
      protected org.ldaptive.sasl.SaslConfig getSaslConfig​(String authenticationType)  
      protected void internalInit​(boolean forceReinit)  
      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)  
      void validate​(org.pac4j.core.credentials.Credentials credentials, org.pac4j.core.context.WebContext context, org.pac4j.core.context.session.SessionStore sessionStore)  
      • 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

        defaultProfileDefinition, getProfileDefinition, setProfileDefinition
      • Methods inherited from class org.pac4j.core.util.InitializableObject

        afterInternalInit, beforeInternalInit, getLastAttempt, getMaxAttempts, getMinTimeIntervalBetweenAttemptsInMilliseconds, getNbAttempts, init, init, isInitialized, reinit, setMaxAttempts, setMinTimeIntervalBetweenAttemptsInMilliseconds
    • Field Detail

      • logger

        protected final org.slf4j.Logger logger
    • Constructor Detail

      • AxelorLdapProfileService

        @Inject
        public AxelorLdapProfileService()
      • AxelorLdapProfileService

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

      • 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 void validate​(org.pac4j.core.credentials.Credentials credentials,
                             org.pac4j.core.context.WebContext context,
                             org.pac4j.core.context.session.SessionStore sessionStore)
        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