mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-02-23 14:33:43 +01:00
Improve documentation around /account/whoami
Clarifies: https://github.com/matrix-org/matrix-doc/issues/1135 Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
parent
8c61da287d
commit
2e4e5e25e8
|
|
@ -29,7 +29,13 @@ paths:
|
||||||
get:
|
get:
|
||||||
summary: Gets information about the owner of an access token.
|
summary: Gets information about the owner of an access token.
|
||||||
description: |-
|
description: |-
|
||||||
Gets information about the owner of a given access token.
|
Gets information about the owner of a given access token.
|
||||||
|
|
||||||
|
If the owner of the access token is an application service,
|
||||||
|
the server should return the user ID making the request. The
|
||||||
|
server should respect the application service client/server API
|
||||||
|
extensions during this request. If the request is made for a
|
||||||
|
virtual user, the server should verify that it is registered.
|
||||||
operationId: getTokenOwner
|
operationId: getTokenOwner
|
||||||
security:
|
security:
|
||||||
- accessToken: []
|
- accessToken: []
|
||||||
|
|
@ -40,8 +46,8 @@ paths:
|
||||||
The token belongs to a known user.
|
The token belongs to a known user.
|
||||||
examples:
|
examples:
|
||||||
application/json: {
|
application/json: {
|
||||||
"user_id": "@joe:example.org"
|
"user_id": "@joe:example.org"
|
||||||
}
|
}
|
||||||
schema:
|
schema:
|
||||||
type: object
|
type: object
|
||||||
required: ["user_id"]
|
required: ["user_id"]
|
||||||
|
|
@ -49,5 +55,29 @@ paths:
|
||||||
user_id:
|
user_id:
|
||||||
type: string
|
type: string
|
||||||
description: The user id that owns the access token.
|
description: The user id that owns the access token.
|
||||||
|
401:
|
||||||
|
description:
|
||||||
|
The token is not recongized
|
||||||
|
examples:
|
||||||
|
application/json: {
|
||||||
|
"errcode": "M_UNKNOWN_TOKEN",
|
||||||
|
"error": "Unrecongised access token."
|
||||||
|
}
|
||||||
|
schema:
|
||||||
|
"$ref": "definitions/error.yaml"
|
||||||
|
403:
|
||||||
|
description:
|
||||||
|
The appservice cannot masquerade the user or has not registered them.
|
||||||
|
examples:
|
||||||
|
application/json: {
|
||||||
|
"errcode": "M_FORBIDDEN",
|
||||||
|
"error": "Application service has not registered this user."
|
||||||
|
}
|
||||||
|
schema:
|
||||||
|
"$ref": "definitions/error.yaml"
|
||||||
|
429:
|
||||||
|
description: This request was rate-limited.
|
||||||
|
schema:
|
||||||
|
"$ref": "definitions/error.yaml"
|
||||||
tags:
|
tags:
|
||||||
- User data
|
- User data
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue