mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-18 08:44:20 -05:00
Fix flake8 warnings
This commit is contained in:
parent
d5a825edee
commit
ea570ffaeb
@ -336,14 +336,16 @@ class AuthHandler(BaseHandler):
|
|||||||
m.add_first_party_caveat("type = refresh")
|
m.add_first_party_caveat("type = refresh")
|
||||||
# Important to add a nonce, because otherwise every refresh token for a
|
# Important to add a nonce, because otherwise every refresh token for a
|
||||||
# user will be the same.
|
# user will be the same.
|
||||||
m.add_first_party_caveat("nonce = %s" % stringutils.random_string_with_symbols(16))
|
m.add_first_party_caveat("nonce = %s" % (
|
||||||
|
stringutils.random_string_with_symbols(16),
|
||||||
|
))
|
||||||
return m.serialize()
|
return m.serialize()
|
||||||
|
|
||||||
def _generate_base_macaroon(self, user_id):
|
def _generate_base_macaroon(self, user_id):
|
||||||
macaroon = pymacaroons.Macaroon(
|
macaroon = pymacaroons.Macaroon(
|
||||||
location = self.hs.config.server_name,
|
location=self.hs.config.server_name,
|
||||||
identifier = "key",
|
identifier="key",
|
||||||
key = self.hs.config.macaroon_secret_key)
|
key=self.hs.config.macaroon_secret_key)
|
||||||
macaroon.add_first_party_caveat("gen = 1")
|
macaroon.add_first_party_caveat("gen = 1")
|
||||||
macaroon.add_first_party_caveat("user_id = %s" % (user_id,))
|
macaroon.add_first_party_caveat("user_id = %s" % (user_id,))
|
||||||
return macaroon
|
return macaroon
|
||||||
|
Loading…
Reference in New Issue
Block a user