Skip to content

Commit 5c96f45

Browse files
authored
Specify that appservice login and register fail on incorrect as_tokens (#1744)
Signed-off-by: Tulir Asokan <tulir@maunium.net>
1 parent 4d7e33e commit 5c96f45

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Clarify that the `/login` and `/register` endpoints should fail when using the `m.login.application_service` login type without a valid `as_token`.

content/application-service-api.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,12 @@ an application service-defined namespace will receive the same
436436
`M_EXCLUSIVE` error code, but only if the application service has
437437
defined the namespace as `exclusive`.
438438
439+
If `/register` or `/login` is called with the `m.login.application_service`
440+
login type, but without a valid `as_token`, the endpoints will return an error
441+
with the `M_MISSING_TOKEN` or `M_UNKNOWN_TOKEN` error code and 401 as the HTTP
442+
status code. This is the same behavior as invalid auth in the client-server API
443+
(see [Using access tokens](/client-server-api/#using-access-tokens)).
444+
439445
#### Pinging
440446
441447
{{% added-in v="1.7" %}}

0 commit comments

Comments
 (0)