@@ -134,9 +134,27 @@ paths:
134134 200 :
135135 description : The addition was successful.
136136 examples :
137- application/json : {}
137+ application/json : {
138+ " submit_url " : " https://example.org/path/to/submitToken"
139+ }
138140 schema :
139141 type : object
142+ properties :
143+ submit_url :
144+ type : string
145+ description : |-
146+ An optional field containing a URL where the client must
147+ submit the validation token to, with identical parameters
148+ to the Identity Service API's ``POST
149+ /validate/email/submitToken`` endpoint. The homeserver must
150+ send this token to the user (if applicable), who should
151+ then be prompted to provide it to the client.
152+
153+ If this field is not present, the client can assume that
154+ verification will happen without the client's involvement
155+ provided the homeserver advertises this specification version
156+ in the ``/versions`` response (ie: r0.5.0).
157+ example : " https://example.org/path/to/submitToken"
140158 403 :
141159 description : The credentials could not be verified with the identity server.
142160 examples :
@@ -163,6 +181,14 @@ paths:
163181 schema :
164182 type : object
165183 properties :
184+ id_server :
185+ type : string
186+ description : |-
187+ The identity server to unbind from. If not provided, the homeserver
188+ MUST use the ``id_server`` the identifier was added through. If the
189+ homeserver does not know the original ``id_server``, it MUST return
190+ a ``id_server_unbind_result`` of ``no-support``.
191+ example : " example.org"
166192 medium :
167193 type : string
168194 description : The medium of the third party identifier being removed.
@@ -180,41 +206,55 @@ paths:
180206 user.
181207 schema :
182208 type : object
183- properties : {}
209+ properties :
210+ id_server_unbind_result :
211+ type : string
212+ enum :
213+ # XXX: I don't know why, but the order matters here so that "no-support"
214+ # doesn't become "no- support" by the renderer.
215+ - " no-support"
216+ - " success"
217+ description : |-
218+ An indicator as to whether or not the homeserver was able to unbind
219+ the 3PID from the identity server. ``success`` indicates that the
220+ indentity server has unbound the identifier whereas ``no-support``
221+ indicates that the identity server refuses to support the request
222+ or the homeserver was not able to determine an identity server to
223+ unbind from.
224+ example : " success"
225+ required :
226+ - id_server_unbind_result
184227 tags :
185228 - User data
186229 " /account/3pid/email/requestToken " :
187230 post :
188231 summary : Begins the validation process for an email address for association with the user's account.
189232 description : |-
190- Proxies the Identity Service API ``validate/email/requestToken``, but
191- first checks that the given email address is **not** already associated
192- with an account on this homeserver. This API should be used to request
193- validation tokens when adding an email address to an account. This API's
194- parameters and response are identical to that of the |/register/email/requestToken|_
195- endpoint.
233+ The homeserver must check that the given email address is **not**
234+ already associated with an account on this homeserver. This API should
235+ be used to request validation tokens when adding an email address to an
236+ account. This API's parameters and response are identical to that of
237+ the |/register/email/requestToken|_ endpoint. The homeserver has the
238+ choice of validating the email address itself, or proxying the request
239+ to the ``/validate/email/requestToken`` Identity Service API as
240+ identified by ``id_server``. It is imperative that the
241+ homeserver keep a list of trusted Identity Servers and only proxies to
242+ those that it trusts.
196243 operationId : requestTokenTo3PIDEmail
197244 parameters :
198245 - in : body
199246 name : body
200247 required : true
201248 schema :
202- allOf :
203- - $ref : " ../identity/definitions/request_email_validation.yaml"
204- - type : object
205- properties :
206- id_server :
207- type : string
208- description : |-
209- The hostname of the identity server to communicate with. May
210- optionally include a port.
211- example : " id.example.com"
212- required : ['id_server']
249+ $ref : " ./definitions/request_email_validation.yaml"
213250 responses :
214251 200 :
215- description : An email was sent to the given address.
252+ description : |-
253+ An email was sent to the given address. Note that this may be an
254+ email containing the validation token or it may be informing the
255+ user of an error.
216256 schema :
217- $ref : " ../identity/ definitions/sid .yaml"
257+ $ref : " definitions/request_token_response .yaml"
218258 403 :
219259 description : |-
220260 The homeserver does not allow the third party identifier as a
@@ -241,34 +281,28 @@ paths:
241281 post :
242282 summary : Begins the validation process for a phone number for association with the user's account.
243283 description : |-
244- Proxies the Identity Service API ``validate/msisdn/requestToken``, but
245- first checks that the given phone number is **not** already associated
246- with an account on this homeserver. This API should be used to request
247- validation tokens when adding a phone number to an account. This API's
248- parameters and response are identical to that of the |/register/msisdn/requestToken|_
249- endpoint.
284+ The homeserver must check that the given phone number is **not**
285+ already associated with an account on this homeserver. This API should
286+ be used to request validation tokens when adding a phone number to an
287+ account. This API's parameters and response are identical to that of
288+ the |/register/msisdn/requestToken|_ endpoint. The homeserver has the
289+ choice of validating the phone number itself, or proxying the request
290+ to the ``/validate/msisdn/requestToken`` Identity Service API as
291+ identified by ``id_server``. It is imperative that the
292+ homeserver keep a list of trusted Identity Servers and only proxies to
293+ those that it trusts.
250294 operationId : requestTokenTo3PIDMSISDN
251295 parameters :
252296 - in : body
253297 name : body
254298 required : true
255299 schema :
256- allOf :
257- - $ref : " ../identity/definitions/request_msisdn_validation.yaml"
258- - type : object
259- properties :
260- id_server :
261- type : string
262- description : |-
263- The hostname of the identity server to communicate with. May
264- optionally include a port.
265- example : " id.example.com"
266- required : ['id_server']
300+ $ref : " ./definitions/request_msisdn_validation.yaml"
267301 responses :
268302 200 :
269303 description : An SMS message was sent to the given phone number.
270304 schema :
271- $ref : " ../identity/ definitions/sid .yaml"
305+ $ref : " definitions/request_token_response .yaml"
272306 403 :
273307 description : |-
274308 The homeserver does not allow the third party identifier as a
0 commit comments