Added setUsers and setAuthorities for easier configuration
This commit is contained in:
parent
41f7bb3755
commit
0edb75d4aa
|
@ -53,6 +53,16 @@ public class UserAttribute {
|
|||
return (GrantedAuthority[]) this.authorities.toArray(toReturn);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set all authorities for this user.
|
||||
*
|
||||
* @param authorities {@link List} <{@link GrantedAuthority}>
|
||||
* @since 1.1
|
||||
*/
|
||||
public void setAuthorities(List authorities) {
|
||||
this.authorities = authorities;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
|
|
@ -86,4 +86,14 @@ public class UserMap {
|
|||
public int getUserCount() {
|
||||
return this.userMap.size();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the users in this {@link UserMap}. Overrides previously added users.
|
||||
*
|
||||
* @param users {@link Map} <{@link String}, {@link UserDetails}> with pairs (username, userdetails)
|
||||
* @since 1.1
|
||||
*/
|
||||
public void setUsers(Map users) {
|
||||
this.userMap = users;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue