public interface UserManager extends AbstractEntityManager<org.jboss.errai.security.shared.api.identity.User,UserManagerSettings>
The Users Manager.
The user manager provide additional methods to implement from the entity manager ones.
Modifier and Type | Interface and Description |
---|---|
static interface |
UserManager.UserAttribute
Description of a user attribute that is supported by the specific manager implementation.
|
AbstractEntityManager.SearchRequest, AbstractEntityManager.SearchResponse<T>
Modifier and Type | Method and Description |
---|---|
void |
assignGroups(String username,
Collection<String> groups)
Assign a collection of groups to a user.
|
void |
assignRoles(String username,
Collection<String> roles)
Assign a collection of roles to a user.
|
void |
changePassword(String username,
String newPassword)
Changes the user's password.
|
create, delete, get, getSettings, search, update
void assignGroups(String username, Collection<String> groups) throws SecurityManagementException
Assign a collection of groups to a user.
.All the groups given will be assigned to the user, the current existing assigned ones will be removed.
It's important to note that the inherited create
and update
methods should not assign groups, this operations must be done in this method,
as it's easier for mapping with the capabilities approach.
username
- The user identifier.groups
- The collection of groups identifiers to assign.SecurityManagementException
void assignRoles(String username, Collection<String> roles) throws SecurityManagementException
Assign a collection of roles to a user.
.All the roles given will be assigned to the user, the current existing assigned ones will be removed.
It's important to note that the inherited create
and update
methods should not assign roles, this operations must be done in this method,
as it's easier for mapping with the capabilities approach.
username
- The user identifier.roles
- The collection of roles identifiers to assign.SecurityManagementException
void changePassword(String username, String newPassword) throws SecurityManagementException
Changes the user's password.
username
- The user identifier.newPassword
- The new password.SecurityManagementException
Copyright © 2012–2020 JBoss by Red Hat. All rights reserved.