Package nzilbb.labbcat.server.api.admin
Class Password
- java.lang.Object
-
- nzilbb.labbcat.server.api.APIRequestHandler
-
- nzilbb.labbcat.server.api.admin.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.
- 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 or error.- Returns:
- A JSON object as the request response.
-
-