From e6862512dc0d78dc069e8799c06b47024ed167d3 Mon Sep 17 00:00:00 2001
From: erikjohnston
The second dictionary contains the parameters provided by the user's client in the request
@@ -309,6 +309,20 @@ callback that does not return None
will be used. If this happens, S
any of the subsequent implementations of this callback. If every callback return None
,
the username provided by the user is used, if any (otherwise one is automatically
generated).
is_3pid_allowed
First introduced in Synapse v1.53.0
+async def is_3pid_allowed(self, medium: str, address: str, registration: bool) -> bool
+
+Called when attempting to bind a third-party identifier (i.e. an email address or a phone
+number). The module is given the medium of the third-party identifier (which is email
if
+the identifier is an email address, or msisdn
if the identifier is a phone number) and
+its address, as well as a boolean indicating whether the attempt to bind is happening as
+part of registering a new user. The module must return a boolean indicating whether the
+identifier can be allowed to be bound to an account on the local homeserver.
If multiple modules implement this callback, they will be considered in order. If a
+callback returns True
, Synapse falls through to the next one. The value of the first
+callback that does not return True
will be used. If this happens, Synapse will not call
+any of the subsequent implementations of this callback.
The example module below implements authentication checkers for two different login types: