@Deprecated
public class UserMap
extends java.lang.Object
InMemoryDaoImpl
to store a list of users and their corresponding granted authorities.
Usernames are used as the lookup key and are stored in lower case, to allow case-insensitive lookups. So this class should not be used if usernames need to be case-sensitive.
Constructor and Description |
---|
UserMap()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addUser(UserDetails user)
Deprecated.
Adds a user to the in-memory map.
|
UserDetails |
getUser(java.lang.String username)
Deprecated.
Locates the specified user by performing a case insensitive search by username.
|
int |
getUserCount()
Deprecated.
Indicates the size of the user map.
|
void |
setUsers(java.util.Map<java.lang.String,UserDetails> users)
Deprecated.
Set the users in this
UserMap . |
public void addUser(UserDetails user) throws java.lang.IllegalArgumentException
user
- the user to be storedjava.lang.IllegalArgumentException
- if a null User was passedpublic UserDetails getUser(java.lang.String username) throws UsernameNotFoundException
username
- to findUsernameNotFoundException
- if the user could not be foundpublic int getUserCount()
public void setUsers(java.util.Map<java.lang.String,UserDetails> users)
UserMap
. Overrides previously added users.users
- Map
<String
, UserDetails
> with pairs (username, userdetails)