diff options
author | babolivier <babolivier@users.noreply.github.com> | 2022-02-17 16:54:48 +0000 |
---|---|---|
committer | babolivier <babolivier@users.noreply.github.com> | 2022-02-17 16:54:48 +0000 |
commit | c80dc81ebc6e3fe11593ce3fbe90af9030d55f1f (patch) | |
tree | 8b40d0cd794f8d8ef8eabf349c6c4fc0954f0726 /develop/print.html | |
parent | deploy: e69f8f0a8e3b3f3b647efc42fe67b6b9270d26e0 (diff) | |
download | synapse-c80dc81ebc6e3fe11593ce3fbe90af9030d55f1f.tar.xz |
deploy: 707049c6ff61193ffdfba909b4f17e9158c1d3e1
Diffstat (limited to 'develop/print.html')
-rw-r--r-- | develop/print.html | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/develop/print.html b/develop/print.html index a26c70db23..62c84ce528 100644 --- a/develop/print.html +++ b/develop/print.html @@ -8475,7 +8475,7 @@ If the module doesn't wish to return a callback, it must return None instead.</p <p>If multiple modules implement this callback, they will be considered in order. If a callback returns <code>None</code>, Synapse falls through to the next one. The value of the first callback that does not return <code>None</code> will be used. If this happens, Synapse will not call -any of the subsequent implementations of this callback. If every callback return <code>None</code>, +any of the subsequent implementations of this callback. If every callback returns <code>None</code>, the authentication is denied.</p> <h3 id="on_logged_out"><a class="header" href="#on_logged_out"><code>on_logged_out</code></a></h3> <p><em>First introduced in Synapse v1.46.0</em></p> @@ -8535,9 +8535,30 @@ return <code>None</code>.</p> <p>If multiple modules implement this callback, they will be considered in order. If a callback returns <code>None</code>, Synapse falls through to the next one. The value of the first callback that does not return <code>None</code> will be used. If this happens, Synapse will not call -any of the subsequent implementations of this callback. If every callback return <code>None</code>, +any of the subsequent implementations of this callback. If every callback returns <code>None</code>, the username provided by the user is used, if any (otherwise one is automatically generated).</p> +<h3 id="get_displayname_for_registration"><a class="header" href="#get_displayname_for_registration"><code>get_displayname_for_registration</code></a></h3> +<p><em>First introduced in Synapse v1.54.0</em></p> +<pre><code class="language-python">async def get_displayname_for_registration( + uia_results: Dict[str, Any], + params: Dict[str, Any], +) -> Optional[str] +</code></pre> +<p>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 <code>None</code> if it doesn't wish to force a +display name for this user.</p> +<p>This callback is called once <a href="https://spec.matrix.org/latest/client-server-api/#user-interactive-authentication-api">User-Interactive Authentication</a> +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 +<a href="modules/password_auth_provider_callbacks.html#get_username_for_registration"><code>get_username_for_registration</code></a>, so refer to the +documentation of this callback for more information about them.</p> +<p>If multiple modules implement this callback, they will be considered in order. If a +callback returns <code>None</code>, Synapse falls through to the next one. The value of the first +callback that does not return <code>None</code> will be used. If this happens, Synapse will not call +any of the subsequent implementations of this callback. If every callback returns <code>None</code>, +the username will be used (e.g. <code>alice</code> if the user being registered is <code>@alice:example.com</code>).</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 @@ -8564,7 +8585,7 @@ any of the subsequent implementations of this callback.</p> <li><code>m.login.password</code> (defined in <a href="https://matrix.org/docs/spec/client_server/latest#password-based">the spec</a>) <ul> <li>Expects a <code>password</code> field to be sent to <code>/login</code></li> -<li>Is checked by the method: <code>self.check_pass</code> </li> +<li>Is checked by the method: <code>self.check_pass</code></li> </ul> </li> </ul> |