summary refs log tree commit diff
path: root/register_new_matrix_user
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-04-02 17:01:29 +0100
committerDavid Baker <dave@matrix.org>2015-04-02 17:01:29 +0100
commit70a84f17f39bbc5c8a68541874ca4767871f2b79 (patch)
tree6d821d5eaa378b9c37ca611a0ffb2f9c8e628eda /register_new_matrix_user
parentExplain how I justified to myself making JsonResource not always send JSON. (diff)
downloadsynapse-70a84f17f39bbc5c8a68541874ca4767871f2b79.tar.xz
Add shared secret auth into register v2 and switch the script over.
Diffstat (limited to 'register_new_matrix_user')
-rwxr-xr-xregister_new_matrix_user5
1 files changed, 2 insertions, 3 deletions
diff --git a/register_new_matrix_user b/register_new_matrix_user
index daddadc302..f833d2a4db 100755
--- a/register_new_matrix_user
+++ b/register_new_matrix_user
@@ -33,10 +33,9 @@ def request_registration(user, password, server_location, shared_secret):
     ).hexdigest()
 
     data = {
-        "user": user,
+        "username": user,
         "password": password,
         "mac": mac,
-        "type": "org.matrix.login.shared_secret",
     }
 
     server_location = server_location.rstrip("/")
@@ -44,7 +43,7 @@ def request_registration(user, password, server_location, shared_secret):
     print "Sending registration request..."
 
     req = urllib2.Request(
-        "%s/_matrix/client/api/v1/register" % (server_location,),
+        "%s/_matrix/client/v2_alpha/register" % (server_location,),
         data=json.dumps(data),
         headers={'Content-Type': 'application/json'}
     )