Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timo Ley
synapse
Commits
586e0df6
Commit
586e0df6
authored
10 years ago
by
Kegan Dougal
Browse files
Options
Downloads
Patches
Plain Diff
Updated spec and api docs to desired new format.
parent
d81e7dc0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/client-server/swagger_matrix/api-docs-registration
+66
-25
66 additions, 25 deletions
docs/client-server/swagger_matrix/api-docs-registration
docs/specification.rst
+7
-8
7 additions, 8 deletions
docs/specification.rst
with
73 additions
and
33 deletions
docs/client-server/swagger_matrix/api-docs-registration
+
66
−
25
View file @
586e0df6
...
@@ -3,35 +3,38 @@
...
@@ -3,35 +3,38 @@
"apis": [
"apis": [
{
{
"operations": [
"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",
"method": "POST",
"nickname": "
register
",
"nickname": "
submit_registration
",
"notes": "
Volatile: This API is likely to change
.",
"notes": "
If this is part of a multi-stage registration, there MUST be a 'session' key
.",
"parameters": [
"parameters": [
{
{
"description": "A registration
request
",
"description": "A registration
submission
",
"name": "body",
"name": "body",
"paramType": "body",
"paramType": "body",
"required": true,
"required": true,
"type": "Registration
Request
"
"type": "Registration
Submission
"
}
}
],
],
"responseMessages": [
"responseMessages": [
{
{
"code": 400,
"code": 400,
"message": "
No JSON object.
"
"message": "
Bad login type
"
},
},
{
{
"code": 400,
"code": 400,
"message": "User ID must only contain characters which do not require url encoding."
"message": "Missing JSON keys"
},
{
"code": 400,
"message": "User ID already taken."
}
}
],
],
"summary": "
Register with the home server
.",
"summary": "
Submit a registration action
.",
"type": "RegistrationRes
ponse
"
"type": "RegistrationRes
ult
"
}
}
],
],
"path": "/register"
"path": "/register"
...
@@ -42,30 +45,68 @@
...
@@ -42,30 +45,68 @@
"application/json"
"application/json"
],
],
"models": {
"models": {
"RegistrationResponse": {
"RegistrationFlows": {
"id": "RegistrationResponse",
"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": {
"properties": {
"access_token": {
"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"
"type": "string"
},
},
"user_id": {
"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"
"type": "string"
},
},
"
home_server
": {
"
session
": {
"description": "
The name of the home server
.",
"description": "
Multi-stage registration only: The session token to send when submitting the next registration type
.",
"type": "string"
"type": "string"
}
}
}
}
},
},
"Registration
Request
": {
"Registration
Submission
": {
"id": "Registration
Request
",
"id": "Registration
Submission
",
"properties": {
"properties": {
"user_id": {
"type": {
"description": "The desired user ID. If not specified, a random user ID will be allocated.",
"description": "The type of registration being submitted.",
"type": "string",
"type": "string"
"required": false
},
"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\""
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
docs/specification.rst
+
7
−
8
View file @
586e0df6
...
@@ -1279,12 +1279,6 @@ display name other than it being a valid unicode string.
...
@@ -1279,12 +1279,6 @@ display name other than it being a valid unicode string.
Registration and login
Registration and login
======================
======================
.. WARNING::
The registration API is likely to change.
.. TODO
- TODO Kegan : Make registration like login (just omit the "user" key on the
initial request?)
Clients must register with a home server in order to use Matrix. After
Clients must register with a home server in order to use Matrix. After
registering, the client will be given an access token which must be used in ALL
registering, the client will be given an access token which must be used in ALL
...
@@ -1297,9 +1291,11 @@ a token sent to their email address, etc. This specification does not define how
...
@@ -1297,9 +1291,11 @@ a token sent to their email address, etc. This specification does not define how
home servers should authorise their users who want to login to their existing
home servers should authorise their users who want to login to their existing
accounts, but instead defines the standard interface which implementations
accounts, but instead defines the standard interface which implementations
should follow so that ANY client can login to ANY home server. Clients login
should follow so that ANY client can login to ANY home server. Clients login
using the |login|_ API.
using the |login|_ API. Clients register using the |register|_ API. Registration
follows the same procedure as login, but the path requests are sent to are
different.
The login process breaks down into the following:
The
registration/
login process breaks down into the following:
1. Determine the requirements for logging in.
1. Determine the requirements for logging in.
2. Submit the login stage credentials.
2. Submit the login stage credentials.
3. Get credentials or be told the next stage in the login process and repeat
3. Get credentials or be told the next stage in the login process and repeat
...
@@ -2216,6 +2212,9 @@ Transaction:
...
@@ -2216,6 +2212,9 @@ Transaction:
.. |login| replace:: ``/login``
.. |login| replace:: ``/login``
.. _login: /docs/api/client-server/#!/-login
.. _login: /docs/api/client-server/#!/-login
.. |register| replace:: ``/register``
.. _register: /docs/api/client-server/#!/-registration
.. |/rooms/<room_id>/messages| replace:: ``/rooms/<room_id>/messages``
.. |/rooms/<room_id>/messages| replace:: ``/rooms/<room_id>/messages``
.. _/rooms/<room_id>/messages: /docs/api/client-server/#!/-rooms/get_messages
.. _/rooms/<room_id>/messages: /docs/api/client-server/#!/-rooms/get_messages
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment