diff options
author | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-09-17 18:27:47 +0100 |
---|---|---|
committer | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-09-17 18:27:47 +0100 |
commit | 4571cf7baadf360e27e05a73142571da9f165d47 (patch) | |
tree | ed5850f285a35df2353b3562ed4bca1fd34d5324 /docs/client-server/swagger_matrix/api-docs-registration | |
parent | Remark on remaining storage modules that still need unit tests (diff) | |
parent | WEB-35: joins/parts should trigger desktop notifications (diff) | |
download | synapse-4571cf7baadf360e27e05a73142571da9f165d47.tar.xz |
Merge branch 'develop' into test-sqlite-memory
Diffstat (limited to 'docs/client-server/swagger_matrix/api-docs-registration')
-rw-r--r-- | docs/client-server/swagger_matrix/api-docs-registration | 91 |
1 files changed, 66 insertions, 25 deletions
diff --git a/docs/client-server/swagger_matrix/api-docs-registration b/docs/client-server/swagger_matrix/api-docs-registration index f4669ea2f0..11c170c3ec 100644 --- a/docs/client-server/swagger_matrix/api-docs-registration +++ b/docs/client-server/swagger_matrix/api-docs-registration @@ -4,34 +4,37 @@ { "operations": [ { + "method": "GET", + "nickname": "get_registration_info", + "notes": "All login stages MUST be mentioned if there is >1 login type.", + "summary": "Get the login mechanism to use when registering.", + "type": "RegistrationFlows" + }, + { "method": "POST", - "nickname": "register", - "notes": "Volatile: This API is likely to change.", + "nickname": "submit_registration", + "notes": "If this is part of a multi-stage registration, there MUST be a 'session' key.", "parameters": [ { - "description": "A registration request", + "description": "A registration submission", "name": "body", "paramType": "body", "required": true, - "type": "RegistrationRequest" + "type": "RegistrationSubmission" } ], "responseMessages": [ { "code": 400, - "message": "No JSON object." + "message": "Bad login type" }, { "code": 400, - "message": "User ID must only contain characters which do not require url encoding." - }, - { - "code": 400, - "message": "User ID already taken." + "message": "Missing JSON keys" } ], - "summary": "Register with the home server.", - "type": "RegistrationResponse" + "summary": "Submit a registration action.", + "type": "RegistrationResult" } ], "path": "/register" @@ -42,30 +45,68 @@ "application/json" ], "models": { - "RegistrationResponse": { - "id": "RegistrationResponse", + "RegistrationFlows": { + "id": "RegistrationFlows", + "properties": { + "flows": { + "description": "A list of valid registration flows.", + "type": "array", + "items": { + "$ref": "RegistrationInfo" + } + } + } + }, + "RegistrationInfo": { + "id": "RegistrationInfo", + "properties": { + "stages": { + "description": "Multi-stage registration only: An array of all the login types required to registration.", + "items": { + "$ref": "string" + }, + "type": "array" + }, + "type": { + "description": "The first login type that must be used when logging in.", + "type": "string" + } + } + }, + "RegistrationResult": { + "id": "RegistrationResult", "properties": { "access_token": { - "description": "The access token for this user.", + "description": "The access token for this user's registration if this is the final stage of the registration process.", "type": "string" - }, + }, "user_id": { - "description": "The fully-qualified user ID.", + "description": "The user's fully-qualified user ID.", + "type": "string" + }, + "next": { + "description": "Multi-stage registration only: The next registration type to submit.", "type": "string" }, - "home_server": { - "description": "The name of the home server.", + "session": { + "description": "Multi-stage registration only: The session token to send when submitting the next registration type.", "type": "string" } } }, - "RegistrationRequest": { - "id": "RegistrationRequest", + "RegistrationSubmission": { + "id": "RegistrationSubmission", "properties": { - "user_id": { - "description": "The desired user ID. If not specified, a random user ID will be allocated.", - "type": "string", - "required": false + "type": { + "description": "The type of registration being submitted.", + "type": "string" + }, + "session": { + "description": "Multi-stage registration only: The session token from an earlier registration stage.", + "type": "string" + }, + "_registration_type_defined_keys_": { + "description": "Keys as defined by the specified registration type, e.g. \"user\", \"password\"" } } } |