mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-07 20:24:08 +01:00
Draft login token spec
This commit is contained in:
parent
ca9f30a7fd
commit
317c2f20d3
|
|
@ -197,6 +197,7 @@ This specification defines the following login types:
|
||||||
- ``m.login.recaptcha``
|
- ``m.login.recaptcha``
|
||||||
- ``m.login.oauth2``
|
- ``m.login.oauth2``
|
||||||
- ``m.login.email.identity``
|
- ``m.login.email.identity``
|
||||||
|
- ``m.login.token``
|
||||||
- ``m.login.dummy``
|
- ``m.login.dummy``
|
||||||
|
|
||||||
Password-based
|
Password-based
|
||||||
|
|
@ -228,6 +229,29 @@ To respond to this type, reply with an auth dict as follows::
|
||||||
"response": "<captcha response>"
|
"response": "<captcha response>"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Token-based
|
||||||
|
~~~~~~~~~~~
|
||||||
|
:Type:
|
||||||
|
``m.login.token``
|
||||||
|
:Description:
|
||||||
|
The client submits a username and token that was generated by the server.
|
||||||
|
|
||||||
|
To respond to this type, reply with an auth dict as follows::
|
||||||
|
|
||||||
|
{
|
||||||
|
"type": "m.login.token",
|
||||||
|
"user": "<user_id or user localpart>",
|
||||||
|
"token": "<token>",
|
||||||
|
"nonce": "<client generated nonce>"
|
||||||
|
}
|
||||||
|
|
||||||
|
The ``nonce`` should be a random string generated by the client for the
|
||||||
|
request. The same ``nonce`` should be used if retrying the request.
|
||||||
|
|
||||||
|
The ``token`` may be discovered from e.g. an email or dynamically generated QR
|
||||||
|
code.
|
||||||
|
|
||||||
|
|
||||||
OAuth2-based
|
OAuth2-based
|
||||||
~~~~~~~~~~~~
|
~~~~~~~~~~~~
|
||||||
:Type:
|
:Type:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue