2019-08-20 23:53:31 +00:00
|
|
|
use serde::Deserialize;
|
|
|
|
|
|
|
|
/// Response for 5.4.1: GET /_matrix/client/r0/login
|
|
|
|
#[derive(Deserialize)]
|
|
|
|
pub struct ValidLoginFlows {
|
|
|
|
pub flows: Option<LoginFlow>,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Deserialize)]
|
|
|
|
pub struct LoginFlow {
|
|
|
|
pub r#type: Option<String>,
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Request helper for 5.4.2: POST /_matrix/client/r0/login
|
2019-08-21 05:05:26 +00:00
|
|
|
pub struct LoginRequest {}
|
2019-08-20 23:53:31 +00:00
|
|
|
|
|
|
|
/// Response object for a valid login from 5.4.2: POST /_matrix/client/r0/login
|
|
|
|
pub struct LoginResponse {
|
|
|
|
pub user_id: Option<String>,
|
|
|
|
pub access_token: Option<String>,
|
|
|
|
pub home_server: Option<String>,
|
|
|
|
pub device_id: Option<String>,
|
|
|
|
pub well_known: Option<DiscoveryInformation>,
|
|
|
|
}
|
|
|
|
|
2019-08-21 05:05:26 +00:00
|
|
|
pub struct DiscoveryInformation {}
|