Package io.jmix.core.security
Class CompositeUserRepository
java.lang.Object
io.jmix.core.security.CompositeUserRepository
- All Implemented Interfaces:
UserRepository
,org.springframework.security.core.userdetails.UserDetailsService
An implementation of
UserRepository
that compose all UserRepository
s
registered in an application and delegates operations to them.
For methods that return a single result, it returns the result of the first successful method execution by the delegates (the first one that hasn't ended up with an exception). Method returning a collection includes the results obtained from all the delegates.
-
Field Summary
-
Constructor Summary
-
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)
-
Field Details
-
userRepositories
-
-
Constructor Details
-
CompositeUserRepository
public CompositeUserRepository()
-
-
Method Details
-
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
-
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
-