|
| UploadKeysJob (std::string serverUrl, std::string _accessToken, std::optional< DeviceKeys > deviceKeys=std::nullopt, JsonWrap oneTimeKeys={}, JsonWrap fallbackKeys={}) |
| Upload end-to-end encryption keys. More...
|
|
UploadKeysJob | withData (JsonWrap j) && |
|
UploadKeysJob | withData (JsonWrap j) const & |
|
| BaseJob (std::string serverUrl, std::string requestUrl, Method method, std::string jobId, std::string token={}, ReturnType returnType=ReturnType::Json, Body body=EmptyBody{}, Query query={}, Header header={}, std::optional< FileDesc > responseFile=std::nullopt) |
|
| ~BaseJob () |
|
bool | shouldReturnJson () const |
|
std::string | url () const |
|
Body | requestBody () const |
|
Header | requestHeader () const |
|
ReturnType | returnType () const |
|
Query | requestQuery () const |
| returns the non-encoded query as an array of pairs More...
|
|
Method | requestMethod () const |
|
Response | genResponse (Response r) const |
|
BaseJob | withData (JsonWrap j) && |
|
BaseJob | withData (JsonWrap j) const & |
|
BaseJob | withQueue (std::string id, JobQueuePolicy policy=AlwaysContinue) && |
|
BaseJob | withQueue (std::string id, JobQueuePolicy policy=AlwaysContinue) const & |
|
json | dataJson (const std::string &key) const |
|
std::string | dataStr (const std::string &key) const |
|
std::string | jobId () const |
|
std::optional< std::string > | queueId () const |
|
JobQueuePolicy | queuePolicy () const |
|
std::optional< FileDesc > | responseFile () const |
|
Upload end-to-end encryption keys.
Publishes end-to-end encryption keys for the device.
Kazv::Api::UploadKeysJob::UploadKeysJob |
( |
std::string |
serverUrl, |
|
|
std::string |
_accessToken, |
|
|
std::optional< DeviceKeys > |
deviceKeys = std::nullopt , |
|
|
JsonWrap |
oneTimeKeys = {} , |
|
|
JsonWrap |
fallbackKeys = {} |
|
) |
| |
|
explicit |
Upload end-to-end encryption keys.
- Parameters
-
deviceKeys | Identity keys for the device. May be absent if no new identity keys are required. |
oneTimeKeys | One-time public keys for "pre-key" messages. The names of the properties should be in the format <algorithm>:<key_id> . The format of the key is determined by the key algorithm. |
May be absent if no new one-time keys are required.
- Parameters
-
fallbackKeys | The public key which should be used if the device's one-time keys are exhausted. The fallback key is not deleted once used, but should be replaced when additional one-time keys are being uploaded. The server will notify the client of the fallback key being used through /sync . |
There can only be at most one key per algorithm uploaded, and the server will only persist one key per algorithm.
When uploading a signed key, an additional fallback: true
key should be included to denote that the key is a fallback key.
May be absent if a new fallback key is not required.