diff --git a/api/client-server/administrative_contact.yaml b/api/client-server/administrative_contact.yaml index c196c109..0e93e4cd 100644 --- a/api/client-server/administrative_contact.yaml +++ b/api/client-server/administrative_contact.yaml @@ -246,7 +246,7 @@ paths: name: body required: true schema: - $ref: "../identity/definitions/request_email_validation.yaml" + $ref: "./definitions/request_email_validation.yaml" responses: 200: description: |- @@ -297,7 +297,7 @@ paths: name: body required: true schema: - $ref: "../identity/definitions/request_msisdn_validation.yaml" + $ref: "./definitions/request_msisdn_validation.yaml" responses: 200: description: An SMS message was sent to the given phone number. diff --git a/api/client-server/definitions/request_email_validation.yaml b/api/client-server/definitions/request_email_validation.yaml new file mode 100644 index 00000000..15bc5b3a --- /dev/null +++ b/api/client-server/definitions/request_email_validation.yaml @@ -0,0 +1,26 @@ +# Copyright 2019 The Matrix.org Foundation C.I.C. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +type: object +allOf: +- $ref: "../../identity/definitions/request_email_validation.yaml" +- type: object + properties: + id_server: + type: string + description: |- + The hostname of the identity server to communicate with. May optionally + include a port. This parameter is ignored when the homeserver handles + 3PID verification. + example: "id.example.com" + required: ["id_server"] diff --git a/api/client-server/definitions/request_msisdn_validation.yaml b/api/client-server/definitions/request_msisdn_validation.yaml new file mode 100644 index 00000000..370a10cc --- /dev/null +++ b/api/client-server/definitions/request_msisdn_validation.yaml @@ -0,0 +1,26 @@ +# Copyright 2019 The Matrix.org Foundation C.I.C. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +type: object +allOf: +- $ref: "../../identity/definitions/request_msisdn_validation.yaml" +- type: object + properties: + id_server: + type: string + description: |- + The hostname of the identity server to communicate with. May optionally + include a port. This parameter is ignored when the homeserver handles + 3PID verification. + example: "id.example.com" + required: ["id_server"] diff --git a/api/client-server/registration.yaml b/api/client-server/registration.yaml index d04e1a33..71177d0c 100644 --- a/api/client-server/registration.yaml +++ b/api/client-server/registration.yaml @@ -242,7 +242,7 @@ paths: name: body required: true schema: - $ref: "../identity/definitions/request_email_validation.yaml" + $ref: "./definitions/request_email_validation.yaml" responses: 200: description: |- @@ -295,7 +295,7 @@ paths: name: body required: true schema: - $ref: "../identity/definitions/request_msisdn_validation.yaml" + $ref: "./definitions/request_msisdn_validation.yaml" responses: 200: description: |- @@ -392,14 +392,14 @@ paths: associated** with an account on this homeserver. This API should be used to request validation tokens when authenticating for the ``/account/password`` endpoint. - + This API's parameters and response are identical to that of the |/register/email/requestToken|_ endpoint, except that ``M_THREEPID_NOT_FOUND`` may be returned if no account matching the given email address could be found. The server may instead send an email to the given address prompting the user to create an account. ``M_THREEPID_IN_USE`` may not be returned. - + The homeserver has the choice of validating the email address itself, or proxying the request to the ``/validate/email/requestToken`` Identity Service API. The request should be proxied to the domain that @@ -417,7 +417,7 @@ paths: name: body required: true schema: - $ref: "../identity/definitions/request_email_validation.yaml" + $ref: "./definitions/request_email_validation.yaml" responses: 200: description: An email was sent to the given address. @@ -453,14 +453,14 @@ paths: associated** with an account on this homeserver. This API should be used to request validation tokens when authenticating for the ``/account/password`` endpoint. - + This API's parameters and response are identical to that of the |/register/msisdn/requestToken|_ endpoint, except that ``M_THREEPID_NOT_FOUND`` may be returned if no account matching the given phone number could be found. The server may instead send the SMS to the given phone number prompting the user to create an account. ``M_THREEPID_IN_USE`` may not be returned. - + The homeserver has the choice of validating the phone number itself, or proxying the request to the ``/validate/msisdn/requestToken`` Identity Service API. The request should be proxied to the domain that is sent diff --git a/api/identity/definitions/request_email_validation.yaml b/api/identity/definitions/request_email_validation.yaml index b99fe121..1a7502c7 100644 --- a/api/identity/definitions/request_email_validation.yaml +++ b/api/identity/definitions/request_email_validation.yaml @@ -49,11 +49,4 @@ properties: redirect the user to this URL. This option is ignored when submitting 3PID validation information through a POST request. example: "https://example.org/congratulations.html" - id_server: - type: string - description: |- - The hostname of the identity server to communicate with. May optionally - include a port. This parameter is ignored when the homeserver handles - 3PID verification. - example: "id.example.com" -required: ["client_secret", "email", "send_attempt", "id_server"] +required: ["client_secret", "email", "send_attempt"] diff --git a/api/identity/definitions/request_msisdn_validation.yaml b/api/identity/definitions/request_msisdn_validation.yaml index 08dd0482..018bd733 100644 --- a/api/identity/definitions/request_msisdn_validation.yaml +++ b/api/identity/definitions/request_msisdn_validation.yaml @@ -55,11 +55,4 @@ properties: redirect the user to this URL. This option is ignored when submitting 3PID validation information through a POST request. example: "https://example.org/congratulations.html" - id_server: - type: string - description: |- - The hostname of the identity server to communicate with. May optionally - include a port. This parameter is ignored when the homeserver handles - 3PID verification. - example: "id.example.com" -required: ["client_secret", "country", "phone_number", "send_attempt", "id_server"] +required: ["client_secret", "country", "phone_number", "send_attempt"] diff --git a/changelogs/identity_service/newsfragments/2124.clarification b/changelogs/identity_service/newsfragments/2124.clarification new file mode 100644 index 00000000..384af82f --- /dev/null +++ b/changelogs/identity_service/newsfragments/2124.clarification @@ -0,0 +1 @@ +Remove incorrect ``id_server`` parameter from ``/requestToken`` endpoints.