partial type definitions for login

This commit is contained in:
Edward Shen 2019-08-20 19:53:31 -04:00
parent 0e1b69f526
commit 676f88c843
Signed by: edward
GPG key ID: F350507060ED6C90
2 changed files with 30 additions and 0 deletions

29
src/api/methods/login.rs Normal file
View file

@ -0,0 +1,29 @@
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
pub struct LoginRequest {
}
/// 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>,
}
pub struct DiscoveryInformation {
}

View file

@ -1 +1,2 @@
pub mod login;
pub mod sync;