Reword appservice requirements for /account/whoami

Signed-off-by: Travis Ralston <travpc@gmail.com>
pull/977/head
Travis Ralston 7 years ago
parent 5285dbc655
commit 6ba5d7ca92

@ -33,13 +33,24 @@ paths:
If the owner of the access token is an application service, If the owner of the access token is an application service,
the server should return the user ID making the request. The the server should return the user ID making the request. The
server should respect the application service client/server API user ID making the request can be determined by checking to
extensions during this request. If the request is made for a see if the ``user_id`` query parameter was also supplied. If
virtual user, the server should verify that it is registered. the parameter is not present, the default application service
user ID should be used (defined as the ``sender_localpart``
in the registration). If the parameter is present, the given
user ID should be verified to be both registered and in the
application service's namespace.
operationId: getTokenOwner operationId: getTokenOwner
security: security:
- accessToken: [] - accessToken: []
parameters: [] parameters:
# TODO: Break this out to a template or something (and apply it everywhere)
- in: query
name: user_id
type: string
required: false
description: |-
The user ID to masquerade as. Only applies to application services.
responses: responses:
200: 200:
description: description:
@ -67,7 +78,7 @@ paths:
"$ref": "definitions/error.yaml" "$ref": "definitions/error.yaml"
403: 403:
description: description:
The appservice cannot masquerade the user or has not registered them. The appservice cannot masquerade as the user or has not registered them.
examples: examples:
application/json: { application/json: {
"errcode": "M_FORBIDDEN", "errcode": "M_FORBIDDEN",

Loading…
Cancel
Save