Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document validated_at, added_at, and POST /3pid/delete #1567

Merged
merged 7 commits into from
Aug 30, 2018
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 57 additions & 7 deletions api/client-server/administrative_contact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ paths:
description: The lookup was successful.
examples:
application/json: {
"threepids": [
{
"medium": "email",
"address": "monkey@banana.island"
}
]
}
"threepids": [
{
"medium": "email",
"address": "monkey@banana.island",
"validated_at": 1535176800000,
"added_at": 1535336848756
}
]
}
schema:
type: object
properties:
Expand All @@ -70,6 +72,19 @@ paths:
address:
type: string
description: The third party identifier address.
validated_at:
type: integer
format: int64
description: |-
The timestamp, in milliseconds, when the identifier was
validated by the identity service.
added_at:
type: integer
format: int64
description:
The timestamp, in milliseconds, when the homeserver
associated the third party identifier with the user.
required: ['medium', 'address', 'validated_at', 'added_at']
tags:
- User data
post:
Expand Down Expand Up @@ -133,6 +148,41 @@ paths:
"$ref": "definitions/errors/error.yaml"
tags:
- User data
"/account/3pid/delete":
post:
summary: Deletes a third party identifier from the user's account
description: |-
Removes a third party identifier from the user's account. This may not
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"may not" could be read as forbidding unbinding from the identity service, so I think it would be better to say "might not". (interestingly, RFC2119 says nothing about the phrase "may not", even though it defines "must not" and "should not")

cause an unbind of the identifier from the identity service.
operationId: delete3pidFromAccount
security:
- accessToken: []
parameters:
- in: body
name: body
schema:
type: object
properties:
medium:
type: string
description: The medium of the third party identifier being removed.
enum: ["email", "msisdn"]
example: "email"
address:
type: string
description: The third party address being removed.
example: "example@domain.com"
required: ['medium', 'address']
responses:
200:
description: |-
The homeserver has disassociated the third party identifier from the
user.
schema:
type: object
properties: {}
tags:
- User data
"/account/3pid/email/requestToken":
post:
summary: Requests a validation token be sent to the given email address for the purpose of adding an email address to an account
Expand Down
1 change: 1 addition & 0 deletions changelogs/client_server/newsfragments/1567.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Document the ``validated_at`` and ``added_at`` fields on ``GET /acount/3pid``.
1 change: 1 addition & 0 deletions changelogs/client_server/newsfragments/1567.new
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add ``POST /account/3pid/delete``