mirror of
https://github.com/element-hq/synapse.git
synced 2026-11-11 23:07:47 +00:00
Merge pull request #230 from matrix-org/erikj/appservice_auth_entity
Set request.authenticated_entity for application services
This commit is contained in:
commit
c3dd2ecd5e
1 file changed
+3
@@ -352,6 +352,8 @@ class Auth(object):
|
||||
if not user_id:
|
||||
raise KeyError
|
||||
|
||||
request.authenticated_entity = user_id
|
||||
|
||||
defer.returnValue(
|
||||
(UserID.from_string(user_id), ClientInfo("", ""))
|
||||
)
|
||||
@@ -425,6 +427,7 @@ class Auth(object):
|
||||
"Unrecognised access token.",
|
||||
errcode=Codes.UNKNOWN_TOKEN
|
||||
)
|
||||
request.authenticated_entity = service.sender
|
||||
defer.returnValue(service)
|
||||
except KeyError:
|
||||
raise AuthError(
|
||||
|
||||
Reference in new issue
Block a user