From e6862512dc0d78dc069e8799c06b47024ed167d3 Mon Sep 17 00:00:00 2001 From: erikjohnston Date: Tue, 22 Feb 2022 12:26:55 +0000 Subject: deploy: 07f82ac29be42098ab5b135cb173437f9cd7c754 --- latest/modules/password_auth_provider_callbacks.html | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'latest/modules/password_auth_provider_callbacks.html') diff --git a/latest/modules/password_auth_provider_callbacks.html b/latest/modules/password_auth_provider_callbacks.html index 0ff2e3ea6d..8e827ebc9a 100644 --- a/latest/modules/password_auth_provider_callbacks.html +++ b/latest/modules/password_auth_provider_callbacks.html @@ -99,7 +99,7 @@ @@ -295,7 +295,7 @@ Here's an example featuring all currently supported keys:

"address": "33123456789", "validated_at": 1642701357084, }, - "org.matrix.msc3231.login.registration_token": "sometoken", # User has registered through the flow described in MSC3231 + "m.login.registration_token": "sometoken", # User has registered through a registration token }

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.

Example

The example module below implements authentication checkers for two different login types: