Package nzilbb.labbcat.server.api
Class Password
- java.lang.Object
-
- nzilbb.labbcat.server.api.APIRequestHandler
-
- nzilbb.labbcat.server.api.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.
- Request Body - a JSON-encoded object with the following structure:
- Author:
- Robert Fromont
-
-
Field Summary
-
Fields inherited from class nzilbb.labbcat.server.api.APIRequestHandler
SC_BAD_REQUEST, SC_CONFLICT, SC_FORBIDDEN, SC_INTERNAL_SERVER_ERROR, SC_METHOD_NOT_ALLOWED, SC_NOT_FOUND, SC_OK, SC_UNPROCESSABLE_CONTENT, SC_UNSUPPORTED_MEDIA_TYPE
-
-
Constructor Summary
Constructors Constructor Description Password()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.json.JsonObject
put(InputStream requestBody, Consumer<Integer> httpStatus)
The handler for the request-
Methods inherited from class nzilbb.labbcat.server.api.APIRequestHandler
GetSystemAttribute, init, writeResponse
-
-
-
-
Method Detail
-
put
public javax.json.JsonObject put(InputStream requestBody, Consumer<Integer> httpStatus)
The handler for the requestThis 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.
-
-