Package io.jmix.ldap.userdetails
Class LdapUserRepository
java.lang.Object
io.jmix.ldap.userdetails.LdapUserRepository
- All Implemented Interfaces:
UserRepository
,org.springframework.security.core.userdetails.UserDetailsService
Implementation of UserRepository that searches for users in LDAP.
-
Constructor Summary
ConstructorDescriptionLdapUserRepository
(JmixLdapUserSearch userSearch) LdapUserRepository
(JmixLdapUserSearch userSearch, org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator authoritiesPopulator) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.userdetails.UserDetails
Returns the built-in 'anonymous' user.List<? extends org.springframework.security.core.userdetails.UserDetails>
getByUsernameLike
(String substring) Returns the list of users whose username contains the given substring.org.springframework.security.core.userdetails.UserDetails
Returns the built-in 'system' user.org.springframework.security.core.userdetails.UserDetails
loadUserByUsername
(String username) void
setUserDetailsMapper
(org.springframework.security.ldap.userdetails.UserDetailsContextMapper userDetailsMapper) void
setUsernameAttribute
(String usernameAttribute)
-
Constructor Details
-
LdapUserRepository
-
LdapUserRepository
public LdapUserRepository(JmixLdapUserSearch userSearch, org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator authoritiesPopulator)
-
-
Method Details
-
loadUserByUsername
public org.springframework.security.core.userdetails.UserDetails loadUserByUsername(String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException - Specified by:
loadUserByUsername
in interfaceorg.springframework.security.core.userdetails.UserDetailsService
- Throws:
org.springframework.security.core.userdetails.UsernameNotFoundException
-
setUserDetailsMapper
public void setUserDetailsMapper(org.springframework.security.ldap.userdetails.UserDetailsContextMapper userDetailsMapper) -
getSystemUser
public org.springframework.security.core.userdetails.UserDetails getSystemUser()Description copied from interface:UserRepository
Returns the built-in 'system' user.- Specified by:
getSystemUser
in interfaceUserRepository
-
getAnonymousUser
public org.springframework.security.core.userdetails.UserDetails getAnonymousUser()Description copied from interface:UserRepository
Returns the built-in 'anonymous' user.- Specified by:
getAnonymousUser
in interfaceUserRepository
-
getByUsernameLike
public List<? extends org.springframework.security.core.userdetails.UserDetails> getByUsernameLike(String substring) Description copied from interface:UserRepository
Returns the list of users whose username contains the given substring.- Specified by:
getByUsernameLike
in interfaceUserRepository
-
setUsernameAttribute
-