Class InMemoryUserRepository

java.lang.Object
io.jmix.core.security.InMemoryUserRepository
All Implemented Interfaces:
UserRepository, org.springframework.security.core.userdetails.UserDetailsService

public class InMemoryUserRepository extends Object implements UserRepository
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.springframework.security.core.userdetails.UserDetails
     
    protected org.springframework.security.core.userdetails.UserDetails
     
    protected List<org.springframework.security.core.userdetails.UserDetails>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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>
    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
     
    void
    removeUser(org.springframework.security.core.userdetails.UserDetails user)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • systemUser

      protected org.springframework.security.core.userdetails.UserDetails systemUser
    • anonymousUser

      protected org.springframework.security.core.userdetails.UserDetails anonymousUser
    • users

      protected List<org.springframework.security.core.userdetails.UserDetails> 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 interface org.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 interface UserRepository
    • getAnonymousUser

      public org.springframework.security.core.userdetails.UserDetails getAnonymousUser()
      Description copied from interface: UserRepository
      Returns the built-in 'anonymous' user.
      Specified by:
      getAnonymousUser in interface UserRepository
    • 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 interface UserRepository
    • 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)