Skip to content

Commit

Permalink
Specify that appservice login and register fail on incorrect as_tokens (
Browse files Browse the repository at this point in the history
#1744)


Signed-off-by: Tulir Asokan <tulir@maunium.net>
  • Loading branch information
tulir committed Mar 19, 2024
1 parent 4d7e33e commit 5c96f45
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Clarify that the `/login` and `/register` endpoints should fail when using the `m.login.application_service` login type without a valid `as_token`.
6 changes: 6 additions & 0 deletions content/application-service-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,12 @@ an application service-defined namespace will receive the same
`M_EXCLUSIVE` error code, but only if the application service has
defined the namespace as `exclusive`.

If `/register` or `/login` is called with the `m.login.application_service`
login type, but without a valid `as_token`, the endpoints will return an error
with the `M_MISSING_TOKEN` or `M_UNKNOWN_TOKEN` error code and 401 as the HTTP
status code. This is the same behavior as invalid auth in the client-server API
(see [Using access tokens](/client-server-api/#using-access-tokens)).

#### Pinging

{{% added-in v="1.7" %}}
Expand Down

0 comments on commit 5c96f45

Please sign in to comment.