summary refs log tree commit diff
path: root/docs/sso_mapping_providers.md
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-10-08 17:05:01 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2020-10-08 17:05:01 +0100
commit23b50d6fb881db23324cac9f64cba33a1d3747b3 (patch)
tree160ac2f45363782b0bbc77dc845f410b18585199 /docs/sso_mapping_providers.md
parentAdd `xyz.amorgan.knock` /versions string (diff)
parentMerge tag 'v1.21.0rc3' into develop (diff)
downloadsynapse-23b50d6fb881db23324cac9f64cba33a1d3747b3.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into soru/knock
Diffstat (limited to 'docs/sso_mapping_providers.md')
-rw-r--r--docs/sso_mapping_providers.md14
1 files changed, 13 insertions, 1 deletions
diff --git a/docs/sso_mapping_providers.md b/docs/sso_mapping_providers.md
index abea432343..32b06aa2c5 100644
--- a/docs/sso_mapping_providers.md
+++ b/docs/sso_mapping_providers.md
@@ -57,7 +57,7 @@ A custom mapping provider must specify the following methods:
     - This method must return a string, which is the unique identifier for the
       user. Commonly the ``sub`` claim of the response.
 * `map_user_attributes(self, userinfo, token)`
-    - This method should be async.
+    - This method must be async.
     - Arguments:
       - `userinfo` - A `authlib.oidc.core.claims.UserInfo` object to extract user
                      information from.
@@ -66,6 +66,18 @@ A custom mapping provider must specify the following methods:
     - Returns a dictionary with two keys:
       - localpart: A required string, used to generate the Matrix ID.
       - displayname: An optional string, the display name for the user.
+* `get_extra_attributes(self, userinfo, token)`
+    - This method must be async.
+    - Arguments:
+      - `userinfo` - A `authlib.oidc.core.claims.UserInfo` object to extract user
+                     information from.
+      - `token` - A dictionary which includes information necessary to make
+                  further requests to the OpenID provider.
+    - Returns a dictionary that is suitable to be serialized to JSON. This
+      will be returned as part of the response during a successful login.
+
+      Note that care should be taken to not overwrite any of the parameters
+      usually returned as part of the [login response](https://matrix.org/docs/spec/client_server/latest#post-matrix-client-r0-login).
 
 ### Default OpenID Mapping Provider