Create user with expiry

- Add unittests for client, api and handler

Signed-off-by: Negar Fazeli <negar.fazeli@ericsson.com>
This commit is contained in:
Negi Fazeli 2016-04-20 16:21:40 +02:00 committed by Negar Fazeli
parent ae1af262f6
commit 40aa6e8349
10 changed files with 301 additions and 9 deletions

View file

@ -612,7 +612,8 @@ class Auth(object):
def get_user_from_macaroon(self, macaroon_str):
try:
macaroon = pymacaroons.Macaroon.deserialize(macaroon_str)
self.validate_macaroon(macaroon, "access", False)
self.validate_macaroon(macaroon, "access", self.hs.config.expire_access_token)
user_prefix = "user_id = "
user = None