From 74b65bfc5f3c58005e3892b314e73cfde32355f6 Mon Sep 17 00:00:00 2001
From: erikjohnston 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