Take a boolean not a list of lambdas

This commit is contained in:
Daniel Wagner-Hall 2015-11-19 15:16:25 +00:00
parent 57a76c9aee
commit 248cfd5eb3
2 changed files with 18 additions and 9 deletions

View file

@ -407,7 +407,7 @@ class AuthHandler(BaseHandler):
try:
macaroon = pymacaroons.Macaroon.deserialize(login_token)
auth_api = self.hs.get_auth()
auth_api.validate_macaroon(macaroon, "login", [auth_api.verify_expiry])
auth_api.validate_macaroon(macaroon, "login", True)
return self._get_user_from_macaroon(macaroon)
except (pymacaroons.exceptions.MacaroonException, TypeError, ValueError):
raise AuthError(401, "Invalid token", errcode=Codes.UNKNOWN_TOKEN)