diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-06-23 19:12:38 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-06-23 19:12:38 +0200 |
commit | 0d4315008374d9a4dfb11f934875b1a16670ec74 (patch) | |
tree | 4327eecbf44d79152ac02a37c64bab402b22a8af /lib/csapi/cross_signing.h | |
parent | 65e6ecd9711372e1e2afde769967ee46b3920307 (diff) | |
download | libquotient-0d4315008374d9a4dfb11f934875b1a16670ec74.tar.gz libquotient-0d4315008374d9a4dfb11f934875b1a16670ec74.zip |
Re-generate API files
Diffstat (limited to 'lib/csapi/cross_signing.h')
-rw-r--r-- | lib/csapi/cross_signing.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/lib/csapi/cross_signing.h b/lib/csapi/cross_signing.h new file mode 100644 index 00000000..2ab65e06 --- /dev/null +++ b/lib/csapi/cross_signing.h @@ -0,0 +1,72 @@ +/****************************************************************************** + * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN + */ + +#pragma once + +#include "csapi/definitions/cross_signing_key.h" + +#include "jobs/basejob.h" + +namespace Quotient { + +/*! \brief Upload cross-signing keys. + * + * Publishes cross-signing keys for the user. + * + * This API endpoint uses the [User-Interactive Authentication + * API](/client-server-api/#user-interactive-authentication-api). + */ +class UploadCrossSigningKeysJob : public BaseJob { +public: + /*! \brief Upload cross-signing keys. + * + * \param masterKey + * Optional. The user\'s master key. + * + * \param selfSigningKey + * Optional. The user\'s self-signing key. Must be signed by + * the accompanying master key, or by the user\'s most recently + * uploaded master key if no master key is included in the + * request. + * + * \param userSigningKey + * Optional. The user\'s user-signing key. Must be signed by + * the accompanying master key, or by the user\'s most recently + * uploaded master key if no master key is included in the + * request. + */ + explicit UploadCrossSigningKeysJob( + const Omittable<CrossSigningKey>& masterKey = none, + const Omittable<CrossSigningKey>& selfSigningKey = none, + const Omittable<CrossSigningKey>& userSigningKey = none); +}; + +/*! \brief Upload cross-signing signatures. + * + * Publishes cross-signing signatures for the user. The request body is a + * map from user ID to key ID to signed JSON object. + */ +class UploadCrossSigningSignaturesJob : public BaseJob { +public: + /*! \brief Upload cross-signing signatures. + * + * \param signatures + * The signatures to be published. + */ + explicit UploadCrossSigningSignaturesJob( + const QHash<QString, QHash<QString, QJsonObject>>& signatures = {}); + + // Result properties + + /// A map from user ID to key ID to an error for any signatures + /// that failed. If a signature was invalid, the `errcode` will + /// be set to `M_INVALID_SIGNATURE`. + QHash<QString, QHash<QString, QJsonObject>> failures() const + { + return loadFromJson<QHash<QString, QHash<QString, QJsonObject>>>( + "failures"_ls); + } +}; + +} // namespace Quotient |