From 8a540c45ecfb30eebe4c9873dbe6c8bab45a640b Mon Sep 17 00:00:00 2001
From: reivilibre
None
, Synapse falls through to the next one. The value of the first
callback that does not return None
will be used. If this happens, Synapse will not call
-any of the subsequent implementations of this callback. If every callback return None
,
+any of the subsequent implementations of this callback. If every callback returns None
,
the authentication is denied.
on_logged_out
First introduced in Synapse v1.46.0
@@ -306,9 +306,30 @@ returnNone
.
If multiple modules implement this callback, they will be considered in order. If a
callback returns None
, Synapse falls through to the next one. The value of the first
callback that does not return None
will be used. If this happens, Synapse will not call
-any of the subsequent implementations of this callback. If every callback return None
,
+any of the subsequent implementations of this callback. If every callback returns None
,
the username provided by the user is used, if any (otherwise one is automatically
generated).
get_displayname_for_registration
First introduced in Synapse v1.54.0
+async def get_displayname_for_registration(
+ uia_results: Dict[str, Any],
+ params: Dict[str, Any],
+) -> Optional[str]
+
+Called when registering a new user. The module can return a display name to set for the
+user being registered by returning it as a string, or None
if it doesn't wish to force a
+display name for this user.
This callback is called once User-Interactive Authentication
+has been completed by the user. It is not called when registering a user via SSO. It is
+passed two dictionaries, which include the information that the user has provided during
+the registration process. These dictionaries are identical to the ones passed to
+get_username_for_registration
, so refer to the
+documentation of this callback for more information about them.
If multiple modules implement this callback, they will be considered in order. If a
+callback returns None
, Synapse falls through to the next one. The value of the first
+callback that does not return None
will be used. If this happens, Synapse will not call
+any of the subsequent implementations of this callback. If every callback returns None
,
+the username will be used (e.g. alice
if the user being registered is @alice:example.com
).
is_3pid_allowed
First introduced in Synapse v1.53.0
async def is_3pid_allowed(self, medium: str, address: str, registration: bool) -> bool
@@ -335,7 +356,7 @@ any of the subsequent implementations of this callback.
m.login.password
(defined in the spec)
- Expects a
password
field to be sent to /login
-- Is checked by the method:
self.check_pass
+- Is checked by the method:
self.check_pass
--
cgit 1.4.1