Class Password


  • @RequiredRole("admin")
    public class Password
    extends APIRequestHandler
    /api/admin/password : sets user's password.

    Allows Updating of a user's password.

    Only the PUT HTTP method is supported:

    PUT
    • Request Body - a JSON-encoded object with the following structure:
      user
      User ID to update.
      password
      New password string.
      resetPassword
      Boolean representing whether or not the user should be asked to change their password when they next log in.
    • Response Body - the standard JSON envelope, with a null model.
    • Response Status
      • 200 : The user's password was successfully updated.
      • 404 : The user was not found.

    Author:
    Robert Fromont
    • Constructor Detail

      • Password

        public Password()
        Constructor
    • Method Detail

      • put

        public javax.json.JsonObject put​(InputStream requestBody,
                                         Consumer<Integer> httpStatus)
        The handler for the request

        This set the user password as specified

        Parameters:
        requestBody - Stream supplying the body of the request.
        httpStatus - Receives the response status code, in case or error.
        Returns:
        A JSON object as the request response.