|
|
|
@ -33,6 +33,14 @@ paths:
|
|
|
|
|
description: |-
|
|
|
|
|
Authenticates the user, and issues an access token they can
|
|
|
|
|
use to authorize themself in subsequent requests.
|
|
|
|
|
|
|
|
|
|
If the client does not supply a ``device_id``, the server must
|
|
|
|
|
auto-generate one.
|
|
|
|
|
|
|
|
|
|
The returned access token must be associated with the ``device_id``
|
|
|
|
|
supplied by the client or generated by the server. The server may
|
|
|
|
|
invalidate any access token previously associated with that device. See
|
|
|
|
|
`Relationship between access tokens and devices`_.
|
|
|
|
|
parameters:
|
|
|
|
|
- in: body
|
|
|
|
|
name: body
|
|
|
|
@ -42,7 +50,8 @@ paths:
|
|
|
|
|
{
|
|
|
|
|
"type": "m.login.password",
|
|
|
|
|
"user": "cheeky_monkey",
|
|
|
|
|
"password": "ilovebananas"
|
|
|
|
|
"password": "ilovebananas",
|
|
|
|
|
"initial_device_display_name": "Jungle Phone"
|
|
|
|
|
}
|
|
|
|
|
properties:
|
|
|
|
|
type:
|
|
|
|
@ -67,6 +76,17 @@ paths:
|
|
|
|
|
type: string
|
|
|
|
|
description: |-
|
|
|
|
|
Required when ``type`` is ``m.login.token``. The login token.
|
|
|
|
|
device_id:
|
|
|
|
|
type: string
|
|
|
|
|
description: |-
|
|
|
|
|
ID of the client device. If this does not correspond to a
|
|
|
|
|
known client device, a new device will be created. The server
|
|
|
|
|
will auto-generate a device_id if this is not specified.
|
|
|
|
|
initial_device_display_name:
|
|
|
|
|
type: string
|
|
|
|
|
description: |-
|
|
|
|
|
A display name to assign to the newly-created device. Ignored
|
|
|
|
|
if ``device_id`` corresponds to a known device.
|
|
|
|
|
required: ["type"]
|
|
|
|
|
|
|
|
|
|
responses:
|
|
|
|
@ -77,7 +97,8 @@ paths:
|
|
|
|
|
{
|
|
|
|
|
"user_id": "@cheeky_monkey:matrix.org",
|
|
|
|
|
"access_token": "abc123",
|
|
|
|
|
"home_server": "matrix.org"
|
|
|
|
|
"home_server": "matrix.org",
|
|
|
|
|
"device_id": "GHTYAJCE"
|
|
|
|
|
}
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
@ -93,6 +114,11 @@ paths:
|
|
|
|
|
home_server:
|
|
|
|
|
type: string
|
|
|
|
|
description: The hostname of the homeserver on which the account has been registered.
|
|
|
|
|
device_id:
|
|
|
|
|
type: string
|
|
|
|
|
description: |-
|
|
|
|
|
ID of the logged-in device. Will be the same as the
|
|
|
|
|
corresponding parameter in the request, if one was specified.
|
|
|
|
|
400:
|
|
|
|
|
description: |-
|
|
|
|
|
Part of the request was invalid. For example, the login type may not be recognised.
|
|
|
|
|