Class InMemoryUserDetailsManager

    • Field Detail

      • logger

        protected final org.apache.commons.logging.Log logger
    • Constructor Detail

      • InMemoryUserDetailsManager

        public InMemoryUserDetailsManager()
      • InMemoryUserDetailsManager

        public InMemoryUserDetailsManager​(java.util.Collection<UserDetails> users)
      • InMemoryUserDetailsManager

        public InMemoryUserDetailsManager​(UserDetails... users)
      • InMemoryUserDetailsManager

        public InMemoryUserDetailsManager​(java.util.Properties users)
    • Method Detail

      • deleteUser

        public void deleteUser​(java.lang.String username)
        Description copied from interface: UserDetailsManager
        Remove the user with the given login name from the system.
        Specified by:
        deleteUser in interface UserDetailsManager
      • userExists

        public boolean userExists​(java.lang.String username)
        Description copied from interface: UserDetailsManager
        Check if a user with the supplied login name exists in the system.
        Specified by:
        userExists in interface UserDetailsManager
      • changePassword

        public void changePassword​(java.lang.String oldPassword,
                                   java.lang.String newPassword)
        Description copied from interface: UserDetailsManager
        Modify the current user's password. This should change the user's password in the persistent user repository (datbase, LDAP etc).
        Specified by:
        changePassword in interface UserDetailsManager
        Parameters:
        oldPassword - current password (for re-authentication if required)
        newPassword - the password to change to
      • updatePassword

        public UserDetails updatePassword​(UserDetails user,
                                          java.lang.String newPassword)
        Description copied from interface: UserDetailsPasswordService
        Modify the specified user's password. This should change the user's password in the persistent user repository (database, LDAP etc).
        Specified by:
        updatePassword in interface UserDetailsPasswordService
        Parameters:
        user - the user to modify the password for
        newPassword - the password to change to, encoded by the configured PasswordEncoder
        Returns:
        the updated UserDetails with the new password
      • loadUserByUsername

        public UserDetails loadUserByUsername​(java.lang.String username)
                                       throws UsernameNotFoundException
        Description copied from interface: UserDetailsService
        Locates the user based on the username. In the actual implementation, the search may possibly be case sensitive, or case insensitive depending on how the implementation instance is configured. In this case, the UserDetails object that comes back may have a username that is of a different case than what was actually requested..
        Specified by:
        loadUserByUsername in interface UserDetailsService
        Parameters:
        username - the username identifying the user whose data is required.
        Returns:
        a fully populated user record (never null)
        Throws:
        UsernameNotFoundException - if the user could not be found or the user has no GrantedAuthority
      • setAuthenticationManager

        public void setAuthenticationManager​(AuthenticationManager authenticationManager)