Skip to content

Add basic password authentication #9

@xmclark

Description

@xmclark

Feature Description

Adds basic password authentication for the POST /_matrix/client/r0/login endpoint. m.login.password will be one of the supported auth types when hitting GET /_matrix/client/r0/login.

Acceptance Criteria

See the docs for the login endpoint.
Can hit the POST /_matrix/client/r0/login endpoint with content type application/json and valid m.login.password json body. e.g.

{
  "type": "m.login.password",
  "identifier": {
    "type": "m.id.user",
    "user": "cheeky_monkey"
  },
  "password": "ilovebananas",
  "initial_device_display_name": "Jungle Phone"
}

The 200 status code response body will contain the the access token, and other fields. e.g.

{
  "user_id": "@cheeky_monkey:matrix.org",
  "access_token": "abc123",
  "device_id": "GHTYAJCE"
}

The GET /_matrix/client/r0/login endpoint will now return m.login.password as one of the flows. e.g.

{
  "flows": [
    {
      "type": "m.login.password"
    }
  ]
}

Documentation

https://matrix.org/docs/spec/client_server/r0.4.0.html#post-matrix-client-r0-login

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions