Class PasswordResource
java.lang.Object
com.illumon.iris.db.v2.permissions.rs.PasswordResource
@Path("/users")
@Consumes("application/json")
@Produces("application/json")
public class PasswordResource
extends Object
This is the Acl Password resource, defines all REST operations supported for /acl/users uri. This is used for user
administration in acl database Produces and consumes
MediaType.APPLICATION_JSON-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.deephaven.shadow.resteasy.javax.ws.rs.core.ResponseaddEncodedUser(Password password) Adds new user using details from the passed in entity.io.deephaven.shadow.resteasy.javax.ws.rs.core.ResponseAdds new user using details from the passed in password entity.io.deephaven.shadow.resteasy.javax.ws.rs.core.ResponsechangeEncodedPassword(String userId, Password password) Changes given encrypted password to the given password for user identified in path.io.deephaven.shadow.resteasy.javax.ws.rs.core.ResponsechangePassword(String userId, Password password) Changes current password to the given password after encoding it for user identified in path.io.deephaven.shadow.resteasy.javax.ws.rs.core.ResponsedeleteUser(String userId) Deletes the user identified by the provided userId.
-
Constructor Details
-
PasswordResource
public PasswordResource()
-
-
Method Details
-
addUser
@POST public io.deephaven.shadow.resteasy.javax.ws.rs.core.Response addUser(@NotNull Password password) throws DbAclCheckedException Adds new user using details from the passed in password entity.- Parameters:
password- The entity object as passed in the request- Returns:
Responsewith status code ofResponse.Status.CREATED- Throws:
DbAclCheckedException- upon failure to add user
-
addEncodedUser
@Path("/encoded") @POST public io.deephaven.shadow.resteasy.javax.ws.rs.core.Response addEncodedUser(@NotNull Password password) throws DbAclCheckedException Adds new user using details from the passed in entity. Expects the password is encoded as received- Parameters:
password- The entity object as passed in the request- Returns:
Responsewith status code ofResponse.Status.CREATED- Throws:
DbAclCheckedException- upon failure to add user
-
changePassword
@PUT @Path("/{userId}") public io.deephaven.shadow.resteasy.javax.ws.rs.core.Response changePassword(@PathParam("userId") String userId, @NotNull Password password) throws DbAclCheckedException Changes current password to the given password after encoding it for user identified in path. A user can change his or her own passwordNote: if Manage User Authentication 'iris.enableManagedUserAuthentication' property is false, then trying to set password will return a
Response.Status.METHOD_NOT_ALLOWED- Parameters:
userId- The userid of user whose password is being changedpassword- The entity object that includes the new encoded password- Returns:
Responsewith status code ofResponse.Status.NO_CONTENT- Throws:
DbAclCheckedException- upon failure to change password
-
changeEncodedPassword
@PUT @Path("/encoded/{userId}") public io.deephaven.shadow.resteasy.javax.ws.rs.core.Response changeEncodedPassword(@PathParam("userId") String userId, @NotNull Password password) throws DbAclCheckedException Changes given encrypted password to the given password for user identified in path. A user can change his or her own password. Expects an encrypted password.- Parameters:
userId- The userid of user whose password is being changedpassword- The entity object that includes the new encoded password- Returns:
Responsewith status code ofResponse.Status.OK- Throws:
DbAclCheckedException- upon failure to change password
-
deleteUser
@DELETE @Path("/{userId}") public io.deephaven.shadow.resteasy.javax.ws.rs.core.Response deleteUser(@PathParam("userId") String userId) throws DbAclCheckedException Deletes the user identified by the provided userId.- Parameters:
userId- Identifier of the user to be deleted- Returns:
Responsewith status code ofResponse.Status.NO_CONTENT- Throws:
DbAclCheckedException- upon failure to delete user
-