Class LdapUserSynchronizationManager

java.lang.Object
io.jmix.ldap.userdetails.LdapUserSynchronizationManager

public class LdapUserSynchronizationManager extends Object
  • Field Details

    • groupDn

      protected String groupDn
    • ldapTemplate

      protected org.springframework.ldap.core.LdapTemplate ldapTemplate
    • ldapUserSearch

      protected org.springframework.security.ldap.search.LdapUserSearch ldapUserSearch
    • synchronizationStrategy

      protected LdapUserDetailsSynchronizationStrategy synchronizationStrategy
    • memberAttribute

      protected String memberAttribute
    • usernameAttribute

      protected String usernameAttribute
    • authoritiesPopulator

      protected org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator authoritiesPopulator
  • Constructor Details

    • LdapUserSynchronizationManager

      public LdapUserSynchronizationManager()
  • Method Details

    • setSynchronizationStrategy

      @Autowired(required=false) public void setSynchronizationStrategy(LdapUserDetailsSynchronizationStrategy synchronizationStrategy)
    • setLdapProperties

      @Autowired public void setLdapProperties(LdapProperties ldapProperties)
    • setAuthoritiesPopulator

      @Autowired public void setAuthoritiesPopulator(org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator authoritiesPopulator)
    • synchronizeUsersFromGroup

      public void synchronizeUsersFromGroup()
      Obtains LDAP users from the given group and synchronize them using the synchronizationStrategy.
      Throws:
      IllegalArgumentException - when LDAP group for synchronization is not set or group does not contain any users.
      IllegalStateException - when LdapUserDetailsSynchronizationStrategy bean is not found.
    • getRelativeDn

      protected String getRelativeDn(String dn)
      Obtains the part of a DN relative to the base context.
    • setLdapTemplate

      public void setLdapTemplate(org.springframework.ldap.core.LdapTemplate ldapTemplate)
    • setLdapUserSearch

      public void setLdapUserSearch(org.springframework.security.ldap.search.LdapUserSearch ldapUserSearch)
    • setMemberAttribute

      public void setMemberAttribute(String memberAttribute)
    • setUsernameAttribute

      public void setUsernameAttribute(String usernameAttribute)