summary refs log tree commit diff
path: root/synapse/config
diff options
context:
space:
mode:
authorreivilibre <oliverw@matrix.org>2021-12-06 19:11:43 +0000
committerGitHub <noreply@github.com>2021-12-06 19:11:43 +0000
commit2f053f3f82ca174cc1c858c75afffae51af8ce0d (patch)
tree668444355e50899c87dcbdd09c4641380cad0537 /synapse/config
parentSave the OIDC session ID (sid) with the device on login (#11482) (diff)
downloadsynapse-2f053f3f82ca174cc1c858c75afffae51af8ce0d.tar.xz
Stabilise support for MSC2918 refresh tokens as they have now been merged into the Matrix specification. (#11435)
Diffstat (limited to 'synapse/config')
-rw-r--r--synapse/config/registration.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/synapse/config/registration.py b/synapse/config/registration.py
index 68a4985398..7a059c6dec 100644
--- a/synapse/config/registration.py
+++ b/synapse/config/registration.py
@@ -220,6 +220,44 @@ class RegistrationConfig(Config):
         #
         #session_lifetime: 24h
 
+        # Time that an access token remains valid for, if the session is
+        # using refresh tokens.
+        # For more information about refresh tokens, please see the manual.
+        # Note that this only applies to clients which advertise support for
+        # refresh tokens.
+        #
+        # Note also that this is calculated at login time and refresh time:
+        # changes are not applied to existing sessions until they are refreshed.
+        #
+        # By default, this is 5 minutes.
+        #
+        #refreshable_access_token_lifetime: 5m
+
+        # Time that a refresh token remains valid for (provided that it is not
+        # exchanged for another one first).
+        # This option can be used to automatically log-out inactive sessions.
+        # Please see the manual for more information.
+        #
+        # Note also that this is calculated at login time and refresh time:
+        # changes are not applied to existing sessions until they are refreshed.
+        #
+        # By default, this is infinite.
+        #
+        #refresh_token_lifetime: 24h
+
+        # Time that an access token remains valid for, if the session is NOT
+        # using refresh tokens.
+        # Please note that not all clients support refresh tokens, so setting
+        # this to a short value may be inconvenient for some users who will
+        # then be logged out frequently.
+        #
+        # Note also that this is calculated at login time: changes are not applied
+        # retrospectively to existing sessions for users that have already logged in.
+        #
+        # By default, this is infinite.
+        #
+        #nonrefreshable_access_token_lifetime: 24h
+
         # The user must provide all of the below types of 3PID when registering.
         #
         #registrations_require_3pid: