Key backup: add `PUT /room_keys/version/{version}` to allow matrix clients to add signatures to an existing backup

pull/977/head
manuroe 6 years ago
parent b45cf4483f
commit c9b38cbe53

@ -177,6 +177,42 @@ Error codes:
- `M_NOT_FOUND`: No backup version has been created.
##### `PUT /room_keys/version/{version}`
Update information about the given version, or the current version if `{version}`
is omitted. Only `signatures` in `auth_data` can be updated.
Body parameters:
- `algorithm` (string): Optional. Must be the same as in the body parameters for `GET
/room_keys/version`.
- `auth_data` (object): Required. algorithm-dependent data. For
`m.megolm_backup.v1.curve25519-aes-sha2`, see below for the definition of
this property.
- `version` (string): Optional. The backup version. Must be the same as the query parameter or must be the current version.
Example:
```javascript
{
"auth_data": {
"public_key": "abcdefg",
"signatures": {
"something": {
"ed25519:something": "hijklmnop"
"ed25519:anotherthing": "abcdef"
}
}
}
}
```
On success, returns the empty JSON object.
Error codes:
- `M_NOT_FOUND`: No backup version has been created.
#### Storing keys
##### `PUT /room_keys/keys/${roomId}/${sessionId}?version=$v`

Loading…
Cancel
Save