summary refs log tree commit diff
path: root/synapse/config/key.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2016-05-16 12:59:41 +0100
committerMark Haines <mark.haines@matrix.org>2016-05-16 12:59:41 +0100
commitdd95eb4cb5f1519bfd328249f97f8731c4a11b64 (patch)
tree96220dc54d2d6d0b36999c5c01db8d5f5b13b851 /synapse/config/key.py
parentadd a url_preview_ip_range_whitelist config param so we can whitelist the mat... (diff)
parentfix logo (diff)
downloadsynapse-dd95eb4cb5f1519bfd328249f97f8731c4a11b64.tar.xz
Merge branch 'develop' into matthew/preview_url_ip_whitelist
Diffstat (limited to 'synapse/config/key.py')
-rw-r--r--synapse/config/key.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/config/key.py b/synapse/config/key.py
index a072aec714..6ee643793e 100644
--- a/synapse/config/key.py
+++ b/synapse/config/key.py
@@ -57,6 +57,8 @@ class KeyConfig(Config):
             seed = self.signing_key[0].seed
             self.macaroon_secret_key = hashlib.sha256(seed)
 
+        self.expire_access_token = config.get("expire_access_token", False)
+
     def default_config(self, config_dir_path, server_name, is_generating_file=False,
                        **kwargs):
         base_key_name = os.path.join(config_dir_path, server_name)
@@ -69,6 +71,9 @@ class KeyConfig(Config):
         return """\
         macaroon_secret_key: "%(macaroon_secret_key)s"
 
+        # Used to enable access token expiration.
+        expire_access_token: False
+
         ## Signing Keys ##
 
         # Path to the signing key to sign messages with