diff --git a/src/api/client_server/session.rs b/src/api/client_server/session.rs index f028cf93..f3dc91fe 100644 --- a/src/api/client_server/session.rs +++ b/src/api/client_server/session.rs @@ -4,7 +4,14 @@ use argon2::{PasswordHash, PasswordVerifier}; use ruma::{ api::client::{ error::ErrorKind, - session::{get_login_types, login, logout, logout_all}, + session::{ + get_login_types, + login::{ + self, + v3::{DiscoveryInfo, HomeserverInfo}, + }, + logout, logout_all, + }, uiaa::UserIdentifier, }, UserId, @@ -18,7 +25,7 @@ struct Claims { //exp: usize, } -/// # `GET /_matrix/client/r0/login` +/// # `GET /_matrix/client/v3/login` /// /// Get the supported login types of this server. One of these should be used as the `type` field /// when logging in. @@ -31,7 +38,7 @@ pub async fn get_login_types_route( ])) } -/// # `POST /_matrix/client/r0/login` +/// # `POST /_matrix/client/v3/login` /// /// Authenticates the user and returns an access token it can use in subsequent requests. /// @@ -166,12 +173,38 @@ pub async fn login_route(body: Ruma) -> Result