Set request.authenticated_entity for application services

pull/230/head
Erik Johnston 2015-08-18 15:16:28 +01:00
parent 0d4abf7777
commit ee59af9ac0
1 changed files with 3 additions and 0 deletions

View File

@ -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(