summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorDaniel Wagner-Hall <daniel@matrix.org>2015-08-19 15:20:09 +0100
committerDaniel Wagner-Hall <daniel@matrix.org>2015-08-19 15:20:09 +0100
commitf9e7493ac29f1a7474d9eeb8d1d50e3d57425768 (patch)
treec56c17762b3f1b6a60b801fed3d7ca05c8e7044e /synapse/api
parentMerge branch 'master' into auth (diff)
parentRemove an access token log line (diff)
downloadsynapse-f9e7493ac29f1a7474d9eeb8d1d50e3d57425768.tar.xz
Merge branch 'develop' into auth
Diffstat (limited to 'synapse/api')
-rw-r--r--synapse/api/auth.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py
index a7f428a96c..1e3b0fbfb7 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -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(