
Product
Introducing Scala and Kotlin Support in Socket
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
synapse-email-account-validity
Advanced tools
A Synapse plugin module to manage account validity using validation emails.
This module requires:
Thi plugin can be installed via PyPI:
pip install synapse-email-account-validity
Add the following in your Synapse config under account_validity
:
- module: email_account_validity.EmailAccountValidity
config:
# The maximum amount of time an account can stay valid for without being renewed.
period: 6w
# How long before an account expires should Synapse send it a renewal email.
renew_at: 1w
Also under the HTTP client listener
, configure an additional_resource
as per below:
additional_resources:
"/_synapse/client/email_account_validity":
module: email_account_validity.EmailAccountValidityServlet
config:
# The maximum amount of time an account can stay valid for without being
# renewed.
period: 6w
The syntax for durations is the same as in the rest of Synapse's configuration file.
If they are not already there, copy the templates into Synapse's templates directory.
This plugin exposes three HTTP routes to manage account validity:
POST /_synapse/client/email_account_validity/send_mail
, which any registered user can
hit with an access token to request a renewal email to be sent to their email addresses.GET /_synapse/client/email_account_validity/renew
, which requires a token
query
parameter containing the latest token sent via email to the user, which renews the
account associated with the token.POST /_synapse/client/email_account_validity/admin
, which any server admin can use to
manage the account validity of any registered user. It takes a JSON body with the
following keys:
user_id
(string, required): The Matrix ID of the user to update.expiration_ts
(integer, optional): The new expiration timestamp for this user, in
milliseconds. If no token is provided, a value corresponding to now + period
is
used.enable_renewal_emails
(boolean, optional): Whether to allow renewal emails to be
sent to this user.The two first routes need to be reachable by the end users for this feature to work as intended.
This repository uses tox
to run tests.
This repository uses unittest
to run the tests located in the tests
directory. They can be ran with tox -e tests
.
git tag vX.Y
python3 setup.py sdist
twine upload dist/synapse-email-account-validity-X.Y.tar.gz
git push origin vX.Y
FAQs
An account validity module for Synapse using email
We found that synapse-email-account-validity demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
Application Security
/Security News
Socket CEO Feross Aboukhadijeh and a16z partner Joel de la Garza discuss vibe coding, AI-driven software development, and how the rise of LLMs, despite their risks, still points toward a more secure and innovative future.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.