docs: update authorization documentation

Add documentation for the "/access/users/list" endpoint.  Document the "notify_user_created" and "notify_user_deleted" websocket notifications.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Arksine 2021-05-13 15:38:41 -04:00
parent 1af7f7d550
commit e472fb6c1e
1 changed files with 47 additions and 0 deletions

View File

@ -1635,6 +1635,23 @@ effectively logs the user out.
} }
``` ```
#### List Available Users
HTTP Request:
```http
GET /access/users/list
```
JSON-RPC request: Not Available
Returns: A list of created users on the system
```json
{
"users": [
"testuser",
"testuser2"
]
}
```
#### Reset User Password #### Reset User Password
HTTP Request: HTTP Request:
```http ```http
@ -3007,6 +3024,36 @@ The `action` field may be `added` or `finished`. The `job` field contains
an object matches the one returned when requesting an object matches the one returned when requesting
[job data](#get-a-single-job). [job data](#get-a-single-job).
#### Authorized User Created
If the `[authorization]` module is enabled the following notification is
sent when a new user is created:
```json
{
"jsonrpc": "2.0",
"method": "notify_user_created",
"params": [
{
"username": "<username>"
}
]
}
```
#### Authorized User Deleted
If the `[authorization]` module is enabled the following notification is
sent when an existing user is deleted.
```json
{
"jsonrpc": "2.0",
"method": "notify_user_deleted",
"params": [
{
"username": "<username>"
}
]
}
```
### Appendix ### Appendix
#### Websocket setup #### Websocket setup