Interface GroupManager
- All Known Implementing Classes:
- JdbcUserDetailsManager
public interface GroupManager
Allows management of groups of authorities and their members.
 
 Typically this will be used to supplement the functionality of a
 UserDetailsManager in situations where the organization of application granted
 authorities into groups is preferred over a straight mapping of users to roles.
 
With this scenario, users are allocated to groups and take on the list of authorities which are assigned to the group, providing more flexible administration options.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddGroupAuthority(String groupName, GrantedAuthority authority) Assigns a new authority to a group.voidaddUserToGroup(String username, String group) Makes a user a member of a particular group.voidcreateGroup(String groupName, List<GrantedAuthority> authorities) Creates a new group with the specified list of authorities.voiddeleteGroup(String groupName) Removes a group, including all members and authorities.Returns the names of all groups that this group manager controls.findGroupAuthorities(String groupName) Obtains the list of authorities which are assigned to a group.findUsersInGroup(String groupName) Locates the users who are members of a groupvoidremoveGroupAuthority(String groupName, GrantedAuthority authority) Deletes an authority from those assigned to a groupvoidremoveUserFromGroup(String username, String groupName) Deletes a user's membership of a group.voidrenameGroup(String oldName, String newName) Changes the name of a group without altering the assigned authorities or members.
- 
Method Details- 
findAllGroupsReturns the names of all groups that this group manager controls.
- 
findUsersInGroupLocates the users who are members of a group- Parameters:
- groupName- the group whose members are required
- Returns:
- the usernames of the group members
 
- 
createGroupCreates a new group with the specified list of authorities.- Parameters:
- groupName- the name for the new group
- authorities- the authorities which are to be allocated to this group.
 
- 
deleteGroupRemoves a group, including all members and authorities.- Parameters:
- groupName- the group to remove.
 
- 
renameGroupChanges the name of a group without altering the assigned authorities or members.
- 
addUserToGroupMakes a user a member of a particular group.- Parameters:
- username- the user to be given membership.
- group- the name of the group to which the user will be added.
 
- 
removeUserFromGroupDeletes a user's membership of a group.- Parameters:
- username- the user
- groupName- the group to remove them from
 
- 
findGroupAuthoritiesObtains the list of authorities which are assigned to a group.
- 
addGroupAuthorityAssigns a new authority to a group.
- 
removeGroupAuthorityDeletes an authority from those assigned to a group
 
-