mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:06:07 -04:00
Merge branch 'release-v0.3.0' of github.com:matrix-org/synapse
This commit is contained in:
commit
704e7e9f44
68 changed files with 1811 additions and 627 deletions
|
@ -3,35 +3,38 @@
|
|||
"apis": [
|
||||
{
|
||||
"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": {
|
||||
"access_token": {
|
||||
"description": "The access token for this user.",
|
||||
"type": "string"
|
||||
"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"
|
||||
},
|
||||
"user_id": {
|
||||
"description": "The fully-qualified user ID.",
|
||||
"type": "string"
|
||||
},
|
||||
"home_server": {
|
||||
"description": "The name of the home server.",
|
||||
"type": {
|
||||
"description": "The first login type that must be used when logging in.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"RegistrationRequest": {
|
||||
"id": "RegistrationRequest",
|
||||
"RegistrationResult": {
|
||||
"id": "RegistrationResult",
|
||||
"properties": {
|
||||
"access_token": {
|
||||
"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 desired user ID. If not specified, a random user ID will be allocated.",
|
||||
"type": "string",
|
||||
"required": false
|
||||
"description": "The user's fully-qualified user ID.",
|
||||
"type": "string"
|
||||
},
|
||||
"next": {
|
||||
"description": "Multi-stage registration only: The next registration type to submit.",
|
||||
"type": "string"
|
||||
},
|
||||
"session": {
|
||||
"description": "Multi-stage registration only: The session token to send when submitting the next registration type.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"RegistrationSubmission": {
|
||||
"id": "RegistrationSubmission",
|
||||
"properties": {
|
||||
"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\""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1169,8 +1169,14 @@ This event is sent by the caller when they wish to establish a call.
|
|||
Required keys:
|
||||
- ``call_id`` : "string" - A unique identifier for the call
|
||||
- ``offer`` : "offer object" - The session description
|
||||
- ``version`` : "integer" - The version of the VoIP specification this message
|
||||
adheres to. This specification is version 0.
|
||||
- ``version`` : "integer" - The version of the VoIP specification this
|
||||
message adheres to. This specification is
|
||||
version 0.
|
||||
- ``lifetime`` : "integer" - The time in milliseconds that the invite is
|
||||
valid for. Once the invite age exceeds this
|
||||
value, clients should discard it. They
|
||||
should also no longer show the call as
|
||||
awaiting an answer in the UI.
|
||||
|
||||
Optional keys:
|
||||
None.
|
||||
|
@ -1182,16 +1188,16 @@ This event is sent by the caller when they wish to establish a call.
|
|||
- ``type`` : "string" - The type of session description, in this case 'offer'
|
||||
- ``sdp`` : "string" - The SDP text of the session description
|
||||
|
||||
``m.call.candidate``
|
||||
``m.call.candidates``
|
||||
This event is sent by callers after sending an invite and by the callee after answering.
|
||||
Its purpose is to give the other party an additional ICE candidate to try using to
|
||||
Its purpose is to give the other party additional ICE candidates to try using to
|
||||
communicate.
|
||||
|
||||
Required keys:
|
||||
- ``call_id`` : "string" - The ID of the call this event relates to
|
||||
- ``version`` : "integer" - The version of the VoIP specification this messages
|
||||
adheres to. his specification is version 0.
|
||||
- ``candidate`` : "candidate object" - Object describing the candidate.
|
||||
- ``candidates`` : "array of candidate objects" - Array of object describing the candidates.
|
||||
|
||||
``Candidate Object``
|
||||
|
||||
|
@ -1305,12 +1311,6 @@ display name other than it being a valid unicode string.
|
|||
|
||||
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
|
||||
registering, the client will be given an access token which must be used in ALL
|
||||
|
@ -1323,9 +1323,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
|
||||
accounts, but instead defines the standard interface which implementations
|
||||
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.
|
||||
2. Submit the login stage credentials.
|
||||
3. Get credentials or be told the next stage in the login process and repeat
|
||||
|
@ -1383,7 +1385,7 @@ This specification defines the following login types:
|
|||
- ``m.login.oauth2``
|
||||
- ``m.login.email.code``
|
||||
- ``m.login.email.url``
|
||||
|
||||
- ``m.login.email.identity``
|
||||
|
||||
Password-based
|
||||
--------------
|
||||
|
@ -1531,6 +1533,31 @@ If the link has not been visited yet, a standard error response with an errcode
|
|||
``M_LOGIN_EMAIL_URL_NOT_YET`` should be returned.
|
||||
|
||||
|
||||
Email-based (identity server)
|
||||
-----------------------------
|
||||
:Type:
|
||||
``m.login.email.identity``
|
||||
:Description:
|
||||
Login is supported by authorising an email address with an identity server.
|
||||
|
||||
Prior to submitting this, the client should authenticate with an identity server.
|
||||
After authenticating, the session information should be submitted to the home server.
|
||||
|
||||
To respond to this type, reply with::
|
||||
|
||||
{
|
||||
"type": "m.login.email.identity",
|
||||
"threepidCreds": [
|
||||
{
|
||||
"sid": "<identity server session id>",
|
||||
"clientSecret": "<identity server client secret>",
|
||||
"idServer": "<url of identity server authed with, e.g. 'matrix.org:8090'>"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
|
||||
N-Factor Authentication
|
||||
-----------------------
|
||||
Multiple login stages can be combined to create N-factor authentication during login.
|
||||
|
@ -2242,6 +2269,9 @@ Transaction:
|
|||
.. |login| replace:: ``/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: /docs/api/client-server/#!/-rooms/get_messages
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue