diff options
author | babolivier <babolivier@users.noreply.github.com> | 2022-02-08 10:21:04 +0000 |
---|---|---|
committer | babolivier <babolivier@users.noreply.github.com> | 2022-02-08 10:21:04 +0000 |
commit | 57d8f257848d65dda6e48429171ed78c6eea1865 (patch) | |
tree | 0ee13120e287894efff28c9f28ee26b9cc312956 /develop/modules | |
parent | deploy: 65ef21b1c7b4297d6a7b2888de4cbfe198ac0324 (diff) | |
download | synapse-57d8f257848d65dda6e48429171ed78c6eea1865.tar.xz |
deploy: 0640f8ebaa34e10a69ad7481b738ae36fda1c103
Diffstat (limited to 'develop/modules')
-rw-r--r-- | develop/modules/password_auth_provider_callbacks.html | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/develop/modules/password_auth_provider_callbacks.html b/develop/modules/password_auth_provider_callbacks.html index 3ecc23da09..f4d6f1b41f 100644 --- a/develop/modules/password_auth_provider_callbacks.html +++ b/develop/modules/password_auth_provider_callbacks.html @@ -309,6 +309,20 @@ callback that does not return <code>None</code> will be used. If this happens, S any of the subsequent implementations of this callback. If every callback return <code>None</code>, the username provided by the user is used, if any (otherwise one is automatically generated).</p> +<h2 id="is_3pid_allowed"><a class="header" href="#is_3pid_allowed"><code>is_3pid_allowed</code></a></h2> +<p><em>First introduced in Synapse v1.53.0</em></p> +<pre><code class="language-python">async def is_3pid_allowed(self, medium: str, address: str, registration: bool) -> bool +</code></pre> +<p>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 <code>email</code> if +the identifier is an email address, or <code>msisdn</code> 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.</p> +<p>If multiple modules implement this callback, they will be considered in order. If a +callback returns <code>True</code>, Synapse falls through to the next one. The value of the first +callback that does not return <code>True</code> will be used. If this happens, Synapse will not call +any of the subsequent implementations of this callback.</p> <h2 id="example"><a class="header" href="#example">Example</a></h2> <p>The example module below implements authentication checkers for two different login types: </p> <ul> |