summary refs log tree commit diff
path: root/synapse/storage/appservice.py
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2015-02-09 14:14:15 +0000
committerKegan Dougal <kegan@matrix.org>2015-02-09 14:14:15 +0000
commit5a7dd058184613c70041a61fdbc2ccce104bb500 (patch)
treec223485171f05bc887507d207d88244e4061047e /synapse/storage/appservice.py
parentRegister a user account for the AS when the AS registers. Add 'sender' column... (diff)
downloadsynapse-5a7dd058184613c70041a61fdbc2ccce104bb500.tar.xz
Modify auth.get_user_by_req for authing appservices directly.
Add logic to map the appservice token to the autogenned appservice user ID.
Add unit tests for all forms of get_user_by_req (user/appservice,
valid/bad/missing tokens)
Diffstat (limited to 'synapse/storage/appservice.py')
-rw-r--r--synapse/storage/appservice.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/storage/appservice.py b/synapse/storage/appservice.py

index eef77e737e..ba31c68595 100644 --- a/synapse/storage/appservice.py +++ b/synapse/storage/appservice.py
@@ -215,6 +215,7 @@ class ApplicationServiceStore(SQLBaseStore): "url": res["url"], "token": as_token, "hs_token": res["hs_token"], + "sender": res["sender"], "namespaces": { ApplicationService.NS_USERS: [], ApplicationService.NS_ALIASES: [], @@ -240,6 +241,7 @@ class ApplicationServiceStore(SQLBaseStore): token=service["token"], url=service["url"], namespaces=service["namespaces"], - hs_token=service["hs_token"] + hs_token=service["hs_token"], + sender=service["sender"] ))