From 74b65bfc5f3c58005e3892b314e73cfde32355f6 Mon Sep 17 00:00:00 2001 From: erikjohnston Date: Tue, 2 Nov 2021 14:27:50 +0000 Subject: deploy: 2d44ee6868805d4ff23489a8dd6b4072ff358663 --- latest/modules/account_validity_callbacks.html | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'latest/modules/account_validity_callbacks.html') diff --git a/latest/modules/account_validity_callbacks.html b/latest/modules/account_validity_callbacks.html index 261c3d826d..0eabf60bb7 100644 --- a/latest/modules/account_validity_callbacks.html +++ b/latest/modules/account_validity_callbacks.html @@ -99,7 +99,7 @@ @@ -189,6 +189,7 @@ Synapse instance. Account validity callbacks can be registered using the module register_account_validity_callbacks method.

The available account validity callbacks are:

is_user_expired

+

First introduced in Synapse v1.39.0

async def is_user_expired(user: str) -> Optional[bool]
 

Called when processing any authenticated request (except for logout requests). The module @@ -198,12 +199,18 @@ represented by their Matrix user ID (e.g. @alice:example.com).

If the module returns True, the current request will be denied with the error code ORG_MATRIX_EXPIRED_ACCOUNT and the HTTP status code 403. Note that this doesn't invalidate the user's access token.

+

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.

on_user_registration

+

First introduced in Synapse v1.39.0

async def on_user_registration(user: str) -> None
 

Called after successfully registering a user, in case the module needs to perform extra operations to keep track of them. (e.g. add them to a database table). The user is represented by their Matrix user ID.

+

If multiple modules implement this callback, Synapse runs them all in order.

@@ -216,7 +223,7 @@ represented by their Matrix user ID.

- @@ -234,7 +241,7 @@ represented by their Matrix user ID.

- -- cgit 1.5.1