mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:26:09 -04:00
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)
This commit is contained in:
parent
ac3183caaa
commit
5a7dd05818
5 changed files with 164 additions and 20 deletions
|
@ -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"]
|
||||
))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue