summary refs log tree commit diff
path: root/synapse/config/sso.py
diff options
context:
space:
mode:
authorjkanefendt <43998479+jkanefendt@users.noreply.github.com>2021-06-22 00:48:57 +0200
committerGitHub <noreply@github.com>2021-06-21 23:48:57 +0100
commit756fd513dfaebddd28bf783eafa95b4505ce8745 (patch)
treed9cc98923664fe8fcd66765f8f9fdd858477c2a0 /synapse/config/sso.py
parentFix performance of responding to user key requests over federation (#10221) (diff)
downloadsynapse-756fd513dfaebddd28bf783eafa95b4505ce8745.tar.xz
Implement config option `sso.update_profile_information` (#10108)
Implemented config option sso.update_profile_information to keep user's display name in sync with the SSO displayname.

Signed-off-by: Johannes Kanefendt <johannes.kanefendt@krzn.de>
Diffstat (limited to 'synapse/config/sso.py')
-rw-r--r--synapse/config/sso.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/synapse/config/sso.py b/synapse/config/sso.py
index af645c930d..e4346e02aa 100644
--- a/synapse/config/sso.py
+++ b/synapse/config/sso.py
@@ -74,6 +74,10 @@ class SSOConfig(Config):
 
         self.sso_client_whitelist = sso_config.get("client_whitelist") or []
 
+        self.sso_update_profile_information = (
+            sso_config.get("update_profile_information") or False
+        )
+
         # Attempt to also whitelist the server's login fallback, since that fallback sets
         # the redirect URL to itself (so it can process the login token then return
         # gracefully to the client). This would make it pointless to ask the user for
@@ -111,6 +115,17 @@ class SSOConfig(Config):
             #  - https://riot.im/develop
             #  - https://my.custom.client/
 
+            # Uncomment to keep a user's profile fields in sync with information from
+            # the identity provider. Currently only syncing the displayname is
+            # supported. Fields are checked on every SSO login, and are updated
+            # if necessary.
+            #
+            # Note that enabling this option will override user profile information,
+            # regardless of whether users have opted-out of syncing that
+            # information when first signing in. Defaults to false.
+            #
+            #update_profile_information: true
+
             # Directory in which Synapse will try to find the template files below.
             # If not set, or the files named below are not found within the template
             # directory, default templates from within the Synapse package will be used.