Remove padding space around caveat operators

This commit is contained in:
Daniel Wagner-Hall 2015-08-18 17:39:26 +01:00
parent 42e858daeb
commit ce832c38d4
2 changed files with 8 additions and 8 deletions

View file

@ -278,12 +278,12 @@ class RegistrationHandler(BaseHandler):
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.add_first_party_caveat("type = access")
macaroon.add_first_party_caveat("gen=1")
macaroon.add_first_party_caveat("user_id=%s" % (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,))
macaroon.add_first_party_caveat("time<%d" % (expiry,))
return macaroon.serialize()