Class Password


  • public class Password
    extends APIRequestHandler
    /api/password : change the current user's password.

    Allows Updating of the currently-logged-in user's password.

    Only the PUT HTTP method is supported:

    PUT
    • Request Body - a JSON-encoded object with the following structure:
      currentPassword
      Current password string.
      newPassword
      New password string.
    • Response Body - the standard JSON envelope, with a null model.
    • Response Status
      • 200 : The current user's password was successfully updated.
      • 400 : The newPassword was unacceptable (e.g. blank or missing).
      • 403 : The currentPassword was incorrect.

    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 of error.
        Returns:
        A JSON object as the request response.