From e13feb3880423fef63dbd5a2aac262670a43ec2d Mon Sep 17 00:00:00 2001 From: babolivier Date: Wed, 8 Sep 2021 17:15:19 +0000 Subject: deploy: 03caba65777ab6ec8d089f8975352242e0d7b0af --- develop/modules/account_validity_callbacks.html | 277 ++++++++++++++++++++++++ 1 file changed, 277 insertions(+) create mode 100644 develop/modules/account_validity_callbacks.html (limited to 'develop/modules/account_validity_callbacks.html') diff --git a/develop/modules/account_validity_callbacks.html b/develop/modules/account_validity_callbacks.html new file mode 100644 index 0000000000..36feb1a580 --- /dev/null +++ b/develop/modules/account_validity_callbacks.html @@ -0,0 +1,277 @@ + + + + + + Account validity callbacks - Synapse + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + +
+
+ +
+ +
+ +

Account validity callbacks

+

Account validity callbacks allow module developers to add extra steps to verify the +validity on an account, i.e. see if a user can be granted access to their account on the +Synapse instance. Account validity callbacks can be registered using the module API's +register_account_validity_callbacks method.

+

The available account validity callbacks are:

+

is_user_expired

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

Called when processing any authenticated request (except for logout requests). The module +can return a bool to indicate whether the user has expired and should be locked out of +their account, or None if the module wasn't able to figure it out. The user is +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.

+

on_user_registration

+
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.

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit 1.5.1