Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic password authentication #9

Open
xmclark opened this issue Nov 10, 2018 · 0 comments
Open

Add basic password authentication #9

xmclark opened this issue Nov 10, 2018 · 0 comments

Comments

@xmclark
Copy link
Contributor

xmclark commented Nov 10, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant