diff options
author | Daniel Wagner-Hall <daniel@matrix.org> | 2015-08-20 17:43:12 +0100 |
---|---|---|
committer | Daniel Wagner-Hall <daniel@matrix.org> | 2015-08-20 17:43:12 +0100 |
commit | c7788685b061dc1fbbecc07e472570f99f36dca3 (patch) | |
tree | f01b04d22e4d487bd61c96768154e5e4b6498b10 /synapse | |
parent | Fix indentation (diff) | |
download | synapse-c7788685b061dc1fbbecc07e472570f99f36dca3.tar.xz |
Fix bad merge
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/handlers/auth.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py index e043363176..c983d444e8 100644 --- a/synapse/handlers/auth.py +++ b/synapse/handlers/auth.py @@ -318,18 +318,11 @@ class AuthHandler(BaseHandler): defer.returnValue(refresh_token) def generate_access_token(self, user_id): - macaroon = pymacaroons.Macaroon( - location=self.hs.config.server_name, - identifier="key", - key=self.hs.config.macaroon_secret_key - ) - macaroon.add_first_party_caveat("gen = 1") - macaroon.add_first_party_caveat("user_id = %s" % (user_id,)) + macaroon = self._generate_base_macaroon(user_id) macaroon.add_first_party_caveat("type = access") now = self.hs.get_clock().time_msec() expiry = now + (60 * 60 * 1000) macaroon.add_first_party_caveat("time < %d" % (expiry,)) - return macaroon.serialize() def generate_refresh_token(self, user_id): |