summary refs log tree commit diff
path: root/synapse/rest/client/register.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add a module callback to set username at registration (#11790)Brendan Abolivier2022-01-261-1/+11
| | | | | | This is in the context of mainlining the Tchap fork of Synapse. Currently in Tchap usernames are derived from the user's email address (extracted from the UIA results, more specifically the m.login.email.identity step). This change also exports the check_username method from the registration handler as part of the module API, so that a module can check if the username it's trying to generate is correct and doesn't conflict with an existing one, and fallback gracefully if not. Co-authored-by: David Robertson <davidr@element.io>
* Add a config flag to inhibit `M_USER_IN_USE` during registration (#11743)Brendan Abolivier2022-01-261-0/+11
| | | | | | | This is mostly motivated by the tchap use case, where usernames are automatically generated from the user's email address (in a way that allows figuring out the email address from the username). Therefore, it's an issue if we respond to requests on /register and /register/available with M_USER_IN_USE, because it can potentially leak email addresses (which include the user's real name and place of work). This commit adds a flag to inhibit the M_USER_IN_USE errors that are raised both by /register/available, and when providing a username early into the registration process. This error will still be raised if the user completes the registration process but the username conflicts. This is particularly useful when using modules (https://github.com/matrix-org/synapse/pull/11790 adds a module callback to set the username of users at registration) or SSO, since they can ensure the username is unique. More context is available in the PR that introduced this behaviour to synapse-dinsic: matrix-org/synapse-dinsic#48 - as well as the issue in the matrix-dinsic repo: matrix-org/matrix-dinsic#476
* Stabilise support for MSC2918 refresh tokens as they have now been merged ↵reivilibre2021-12-061-13/+10
| | | | into the Matrix specification. (#11435)
* Update MSC2918 refresh token support to confirm with the latest revision: ↵reivilibre2021-11-261-3/+6
| | | | accept the `refresh_tokens` parameter in the request body rather than in the URL parameters. (#11430)
* Rename unstable `access_token_lifetime` configuration option to ↵reivilibre2021-11-231-1/+3
| | | | `refreshable_access_token_lifetime` to make it clear it only concerns refreshable access tokens. (#11388)
* Use direct references for configuration variables (part 7). (#10959)Patrick Cloke2021-10-041-13/+13
|
* Use direct references for configuration variables (part 6). (#10916)Patrick Cloke2021-09-291-3/+3
|
* Use direct references for some configuration variables (part 3) (#10885)Patrick Cloke2021-09-231-14/+16
| | | | | | | | This avoids the overhead of searching through the various configuration classes by directly referencing the class that the attributes are in. It also improves type hints since mypy can now resolve the types of the configuration variables.
* Add types to synapse.util. (#10601)reivilibre2021-09-101-4/+7
|
* Additional type hints for client REST servlets (part 4) (#10728)Patrick Cloke2021-09-011-7/+7
|
* Additional type hints for the client REST servlets (part 3). (#10707)Patrick Cloke2021-08-311-48/+30
|
* Remove unused `compare_digest` function. (#10706)Patrick Cloke2021-08-271-13/+0
|
* Implement MSC3231: Token authenticated registration (#10142)Callum Brown2021-08-211-0/+72
| | | | | Signed-off-by: Callum Brown <callum@calcuode.com> This is part of my GSoC project implementing [MSC3231](https://github.com/matrix-org/matrix-doc/pull/3231).
* Flatten the synapse.rest.client package (#10600)reivilibre2021-08-171-0/+879