Package io.jmix.ldap.userdetails
Class LdapUserSynchronizationManager
java.lang.Object
io.jmix.ldap.userdetails.LdapUserSynchronizationManager
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator
protected String
protected org.springframework.ldap.core.LdapTemplate
protected org.springframework.security.ldap.search.LdapUserSearch
protected String
protected LdapUserDetailsSynchronizationStrategy
protected String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
getRelativeDn
(String dn) Obtains the part of a DN relative to the base context.void
setAuthoritiesPopulator
(org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator authoritiesPopulator) void
setLdapProperties
(LdapProperties ldapProperties) void
setLdapTemplate
(org.springframework.ldap.core.LdapTemplate ldapTemplate) void
setLdapUserSearch
(org.springframework.security.ldap.search.LdapUserSearch ldapUserSearch) void
setMemberAttribute
(String memberAttribute) void
setSynchronizationStrategy
(LdapUserDetailsSynchronizationStrategy synchronizationStrategy) void
setUsernameAttribute
(String usernameAttribute) void
Obtains LDAP users from the given group and synchronize them using thesynchronizationStrategy
.
-
Field Details
-
groupDn
-
ldapTemplate
protected org.springframework.ldap.core.LdapTemplate ldapTemplate -
ldapUserSearch
protected org.springframework.security.ldap.search.LdapUserSearch ldapUserSearch -
synchronizationStrategy
-
memberAttribute
-
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
-
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 thesynchronizationStrategy
.- 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
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
-
setUsernameAttribute
-