diff options
author | Jonathan de Jong <jonathan@automatia.nl> | 2022-02-04 13:15:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-04 12:15:13 +0000 |
commit | 02632b3504ad4512c5f5a4f859b3fe326b19c788 (patch) | |
tree | a23ed29bbea62e51471f65a059ca3b7929f71e42 /synapse | |
parent | Delete MSC1711_certificates_FAQ.md (#11907) (diff) | |
download | synapse-02632b3504ad4512c5f5a4f859b3fe326b19c788.tar.xz |
Stabilise MSC3231 (Token Based Registration) (#11867)
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/api/constants.py | 2 | ||||
-rw-r--r-- | synapse/handlers/ui_auth/__init__.py | 2 | ||||
-rw-r--r-- | synapse/rest/client/register.py | 7 |
3 files changed, 5 insertions, 6 deletions
diff --git a/synapse/api/constants.py b/synapse/api/constants.py index 52c083a20b..36ace7c613 100644 --- a/synapse/api/constants.py +++ b/synapse/api/constants.py @@ -81,7 +81,7 @@ class LoginType: TERMS: Final = "m.login.terms" SSO: Final = "m.login.sso" DUMMY: Final = "m.login.dummy" - REGISTRATION_TOKEN: Final = "org.matrix.msc3231.login.registration_token" + REGISTRATION_TOKEN: Final = "m.login.registration_token" # This is used in the `type` parameter for /register when called by diff --git a/synapse/handlers/ui_auth/__init__.py b/synapse/handlers/ui_auth/__init__.py index 13b0c61d2e..56eee4057f 100644 --- a/synapse/handlers/ui_auth/__init__.py +++ b/synapse/handlers/ui_auth/__init__.py @@ -38,4 +38,4 @@ class UIAuthSessionDataConstants: # used during registration to store the registration token used (if required) so that: # - we can prevent a token being used twice by one session # - we can 'use up' the token after registration has successfully completed - REGISTRATION_TOKEN = "org.matrix.msc3231.login.registration_token" + REGISTRATION_TOKEN = "m.login.registration_token" diff --git a/synapse/rest/client/register.py b/synapse/rest/client/register.py index e3492f9f93..c283313e8d 100644 --- a/synapse/rest/client/register.py +++ b/synapse/rest/client/register.py @@ -368,7 +368,7 @@ class RegistrationTokenValidityRestServlet(RestServlet): Example: - GET /_matrix/client/unstable/org.matrix.msc3231/register/org.matrix.msc3231.login.registration_token/validity?token=abcd + GET /_matrix/client/v1/register/m.login.registration_token/validity?token=abcd 200 OK @@ -378,9 +378,8 @@ class RegistrationTokenValidityRestServlet(RestServlet): """ PATTERNS = client_patterns( - f"/org.matrix.msc3231/register/{LoginType.REGISTRATION_TOKEN}/validity", - releases=(), - unstable=True, + f"/register/{LoginType.REGISTRATION_TOKEN}/validity", + releases=("v1",), ) def __init__(self, hs: "HomeServer"): |