public class UserRESTService extends Object
| Constructor and Description |
|---|
UserRESTService() |
| Modifier and Type | Method and Description |
|---|---|
String |
createUser(String authToken,
String authProviderIdentifier,
APIUser user)
Creates a new user and returns the username.
|
void |
deleteUser(String authToken,
String authProviderIdentifier,
String username)
Deletes an individual existing user.
|
APIPermissionSet |
getPermissions(String authToken,
String authProviderIdentifier,
String username)
Gets a list of permissions for the user with the given username.
|
APIUser |
getUser(String authToken,
String authProviderIdentifier,
String username)
Retrieves an individual user.
|
List<APIUser> |
getUsers(String authToken,
String authProviderIdentifier,
List<ObjectPermission.Type> permissions)
Gets a list of users in the given data source (UserContext), filtering
the returned list by the given permission, if specified.
|
void |
patchPermissions(String authToken,
String authProviderIdentifier,
String username,
List<APIPatch<String>> patches)
Applies a given list of permission patches.
|
void |
updatePassword(String authToken,
String authProviderIdentifier,
String username,
APIUserPasswordUpdate userPasswordUpdate,
javax.servlet.http.HttpServletRequest request)
Updates the password for an individual existing user.
|
void |
updateUser(String authToken,
String authProviderIdentifier,
String username,
APIUser user)
Updates an individual existing user.
|
public List<APIUser> getUsers(String authToken, String authProviderIdentifier, List<ObjectPermission.Type> permissions) throws GuacamoleException
authToken - The authentication token that is used to authenticate the user
performing the operation.authProviderIdentifier - The unique identifier of the AuthenticationProvider associated with
the UserContext from which the users are to be retrieved.permissions - The set of permissions to filter with. A user must have one or more
of these permissions for a user to appear in the result.
If null, no filtering will be performed.GuacamoleException - If an error is encountered while retrieving users.public APIUser getUser(String authToken, String authProviderIdentifier, String username) throws GuacamoleException
authToken - The authentication token that is used to authenticate the user
performing the operation.authProviderIdentifier - The unique identifier of the AuthenticationProvider associated with
the UserContext from which the requested user is to be retrieved.username - The username of the user to retrieve.GuacamoleException - If an error occurs while retrieving the user.public String createUser(String authToken, String authProviderIdentifier, APIUser user) throws GuacamoleException
authToken - The authentication token that is used to authenticate the user
performing the operation.authProviderIdentifier - The unique identifier of the AuthenticationProvider associated with
the UserContext in which the requested user is to be created.user - The new user to create.GuacamoleException - If a problem is encountered while creating the user.public void updateUser(String authToken, String authProviderIdentifier, String username, APIUser user) throws GuacamoleException
authToken - The authentication token that is used to authenticate the user
performing the operation.authProviderIdentifier - The unique identifier of the AuthenticationProvider associated with
the UserContext in which the requested user is to be updated.username - The username of the user to update.user - The data to update the user with.GuacamoleException - If an error occurs while updating the user.public void updatePassword(String authToken, String authProviderIdentifier, String username, APIUserPasswordUpdate userPasswordUpdate, @Context javax.servlet.http.HttpServletRequest request) throws GuacamoleException
authToken - The authentication token that is used to authenticate the user
performing the operation.authProviderIdentifier - The unique identifier of the AuthenticationProvider associated with
the UserContext in which the requested user is to be updated.username - The username of the user to update.userPasswordUpdate - The object containing the old password for the user, as well as the
new password to set for that user.request - The HttpServletRequest associated with the password update attempt.GuacamoleException - If an error occurs while updating the user's password.public void deleteUser(String authToken, String authProviderIdentifier, String username) throws GuacamoleException
authToken - The authentication token that is used to authenticate the user
performing the operation.authProviderIdentifier - The unique identifier of the AuthenticationProvider associated with
the UserContext from which the requested user is to be deleted.username - The username of the user to delete.GuacamoleException - If an error occurs while deleting the user.public APIPermissionSet getPermissions(String authToken, String authProviderIdentifier, String username) throws GuacamoleException
authToken - The authentication token that is used to authenticate the user
performing the operation.authProviderIdentifier - The unique identifier of the AuthenticationProvider associated with
the UserContext in which the requested user is to be found.username - The username of the user to retrieve permissions for.GuacamoleException - If an error occurs while retrieving permissions.public void patchPermissions(String authToken, String authProviderIdentifier, String username, List<APIPatch<String>> patches) throws GuacamoleException
authToken - The authentication token that is used to authenticate the user
performing the operation.authProviderIdentifier - The unique identifier of the AuthenticationProvider associated with
the UserContext in which the requested user is to be found.username - The username of the user to modify the permissions of.patches - The permission patches to apply for this request.GuacamoleException - If a problem is encountered while modifying permissions.Copyright © 2016. All rights reserved.