Skip to content

Commit 76829ad

Browse files
authored
Merge pull request #2037 from matrix-org/travis/1.0/appservice-hs-token
Clarify how homeservers are meant to auth themselves to appservices
2 parents a8f6169 + e2da372 commit 76829ad

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add missing definition for how appservices verify requests came from a homeserver.

specification/application_service_api.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,15 @@ An example registration file for an IRC-bridging application service is below:
187187
Homeserver -> Application Service API
188188
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
189189

190+
Authorization
191+
+++++++++++++
192+
193+
Homeservers MUST include a query parameter named ``access_token`` containing the
194+
``hs_token`` from the application service's registration when making requests to
195+
the application service. Application services MUST verify the provided ``access_token``
196+
matches their known ``hs_token``, failing the request with a ``M_FORBIDDEN`` error
197+
if it does not match.
198+
190199
Legacy routes
191200
+++++++++++++
192201

0 commit comments

Comments
 (0)