Package io.jmix.core.security
Class InMemoryUserRepository
java.lang.Object
io.jmix.core.security.InMemoryUserRepository
- All Implemented Interfaces:
UserRepository
,org.springframework.security.core.userdetails.UserDetailsService
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.springframework.security.core.userdetails.UserDetails
protected org.springframework.security.core.userdetails.UserDetails
protected List<org.springframework.security.core.userdetails.UserDetails>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addUser
(org.springframework.security.core.userdetails.UserDetails user) protected org.springframework.security.core.userdetails.UserDetails
copyUserDetails
(org.springframework.security.core.userdetails.UserDetails userDetails) protected org.springframework.security.core.userdetails.UserDetails
protected org.springframework.security.core.userdetails.UserDetails
org.springframework.security.core.userdetails.UserDetails
Returns the built-in 'anonymous' user.List<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.protected void
org.springframework.security.core.userdetails.UserDetails
loadUserByUsername
(String username) void
removeUser
(org.springframework.security.core.userdetails.UserDetails user)
-
Field Details
-
systemUser
protected org.springframework.security.core.userdetails.UserDetails systemUser -
anonymousUser
protected org.springframework.security.core.userdetails.UserDetails anonymousUser -
users
-
-
Constructor Details
-
InMemoryUserRepository
public InMemoryUserRepository()
-
-
Method Details
-
initServiceUsers
protected void initServiceUsers() -
createSystemUser
protected org.springframework.security.core.userdetails.UserDetails createSystemUser() -
createAnonymousUser
protected org.springframework.security.core.userdetails.UserDetails createAnonymousUser() -
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
-
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<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
-
addUser
public void addUser(org.springframework.security.core.userdetails.UserDetails user) -
removeUser
public void removeUser(org.springframework.security.core.userdetails.UserDetails user) -
copyUserDetails
protected org.springframework.security.core.userdetails.UserDetails copyUserDetails(org.springframework.security.core.userdetails.UserDetails userDetails)
-