aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/administrative_contact.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/administrative_contact.h')
-rw-r--r--lib/csapi/administrative_contact.h42
1 files changed, 29 insertions, 13 deletions
diff --git a/lib/csapi/administrative_contact.h b/lib/csapi/administrative_contact.h
index e436971d..27334850 100644
--- a/lib/csapi/administrative_contact.h
+++ b/lib/csapi/administrative_contact.h
@@ -24,7 +24,7 @@ namespace Quotient {
* Identifiers in this list may be used by the homeserver as, for example,
* identifiers that it will accept to reset the user's account password.
*/
-class GetAccount3PIDsJob : public BaseJob {
+class QUOTIENT_API GetAccount3PIDsJob : public BaseJob {
public:
// Inner data structures
@@ -102,7 +102,7 @@ struct JsonObjectConverter<GetAccount3PIDsJob::ThirdPartyIdentifier> {
* This results in this endpoint being an equivalent to `/3pid/bind` rather
* than dual-purpose.
*/
-class Post3PIDsJob : public BaseJob {
+class QUOTIENT_API Post3PIDsJob : public BaseJob {
public:
// Inner data structures
@@ -128,6 +128,22 @@ public:
* The third party credentials to associate with the account.
*/
explicit Post3PIDsJob(const ThreePidCredentials& threePidCreds);
+
+ // Result properties
+
+ /// An optional field containing a URL where the client must
+ /// submit the validation token to, with identical parameters
+ /// to the Identity Service API's `POST
+ /// /validate/email/submitToken` endpoint (without the requirement
+ /// for an access token). The homeserver must send this token to the
+ /// user (if applicable), who should then be prompted to provide it
+ /// to the client.
+ ///
+ /// If this field is not present, the client can assume that
+ /// verification will happen without the client's involvement
+ /// provided the homeserver advertises this specification version
+ /// in the `/versions` response (ie: r0.5.0).
+ QUrl submitUrl() const { return loadFromJson<QUrl>("submit_url"_ls); }
};
template <>
@@ -154,7 +170,7 @@ struct JsonObjectConverter<Post3PIDsJob::ThreePidCredentials> {
* Homeservers should prevent the caller from adding a 3PID to their account if
* it has already been added to another user's account on the homeserver.
*/
-class Add3PIDJob : public BaseJob {
+class QUOTIENT_API Add3PIDJob : public BaseJob {
public:
/*! \brief Adds contact information to the user's account.
*
@@ -182,7 +198,7 @@ public:
*
* Homeservers should track successful binds so they can be unbound later.
*/
-class Bind3PIDJob : public BaseJob {
+class QUOTIENT_API Bind3PIDJob : public BaseJob {
public:
/*! \brief Binds a 3PID to the user's account through an Identity Service.
*
@@ -211,7 +227,7 @@ public:
* parameter because the homeserver is expected to sign the request to the
* identity server instead.
*/
-class Delete3pidFromAccountJob : public BaseJob {
+class QUOTIENT_API Delete3pidFromAccountJob : public BaseJob {
public:
/*! \brief Deletes a third party identifier from the user's account
*
@@ -235,7 +251,7 @@ public:
/// An indicator as to whether or not the homeserver was able to unbind
/// the 3PID from the identity server. `success` indicates that the
- /// indentity server has unbound the identifier whereas `no-support`
+ /// identity server has unbound the identifier whereas `no-support`
/// indicates that the identity server refuses to support the request
/// or the homeserver was not able to determine an identity server to
/// unbind from.
@@ -254,7 +270,7 @@ public:
* parameter because the homeserver is expected to sign the request to the
* identity server instead.
*/
-class Unbind3pidFromAccountJob : public BaseJob {
+class QUOTIENT_API Unbind3pidFromAccountJob : public BaseJob {
public:
/*! \brief Removes a user's third party identifier from an identity server.
*
@@ -295,12 +311,12 @@ public:
* be used to request validation tokens when adding an email address to an
* account. This API's parameters and response are identical to that of
* the
- * [`/register/email/requestToken`](/client-server-api/#post_matrixclientr0registeremailrequesttoken)
+ * [`/register/email/requestToken`](/client-server-api/#post_matrixclientv3registeremailrequesttoken)
* endpoint. The homeserver should validate
* the email itself, either by sending a validation email itself or by using
* a service it has control over.
*/
-class RequestTokenTo3PIDEmailJob : public BaseJob {
+class QUOTIENT_API RequestTokenTo3PIDEmailJob : public BaseJob {
public:
/*! \brief Begins the validation process for an email address for
* association with the user's account.
@@ -311,7 +327,7 @@ public:
* be used to request validation tokens when adding an email address to an
* account. This API's parameters and response are identical to that of
* the
- * [`/register/email/requestToken`](/client-server-api/#post_matrixclientr0registeremailrequesttoken)
+ * [`/register/email/requestToken`](/client-server-api/#post_matrixclientv3registeremailrequesttoken)
* endpoint. The homeserver should validate
* the email itself, either by sending a validation email itself or by
* using a service it has control over.
@@ -337,12 +353,12 @@ public:
* be used to request validation tokens when adding a phone number to an
* account. This API's parameters and response are identical to that of
* the
- * [`/register/msisdn/requestToken`](/client-server-api/#post_matrixclientr0registermsisdnrequesttoken)
+ * [`/register/msisdn/requestToken`](/client-server-api/#post_matrixclientv3registermsisdnrequesttoken)
* endpoint. The homeserver should validate
* the phone number itself, either by sending a validation message itself or by
* using a service it has control over.
*/
-class RequestTokenTo3PIDMSISDNJob : public BaseJob {
+class QUOTIENT_API RequestTokenTo3PIDMSISDNJob : public BaseJob {
public:
/*! \brief Begins the validation process for a phone number for association
* with the user's account.
@@ -353,7 +369,7 @@ public:
* be used to request validation tokens when adding a phone number to an
* account. This API's parameters and response are identical to that of
* the
- * [`/register/msisdn/requestToken`](/client-server-api/#post_matrixclientr0registermsisdnrequesttoken)
+ * [`/register/msisdn/requestToken`](/client-server-api/#post_matrixclientv3registermsisdnrequesttoken)
* endpoint. The homeserver should validate
* the phone number itself, either by sending a validation message itself
* or by using a service it has control over.