|
|
|
@ -303,6 +303,8 @@ impl Client {
|
|
|
|
|
// Holds implementation for Section 5.4, Login
|
|
|
|
|
impl Client {
|
|
|
|
|
/// Implementation of [Section 5.4.1 **GET** `/_matrix/client/r0/login`](https://matrix.org/docs/spec/client_server/r0.5.0#get-matrix-client-r0-login).
|
|
|
|
|
///
|
|
|
|
|
/// This request is rate-limited but does not require authentication.
|
|
|
|
|
pub fn login_flows(&self) -> Result<ValidLoginFlows, Box<dyn Error>> {
|
|
|
|
|
Ok(self
|
|
|
|
|
.send(
|
|
|
|
@ -326,6 +328,8 @@ impl Client {
|
|
|
|
|
///
|
|
|
|
|
/// You may specify a device display name if the provided device ID is not
|
|
|
|
|
/// known. It is ignored if the device ID already exists.
|
|
|
|
|
///
|
|
|
|
|
/// This request is rate-limited but does not require authentication.
|
|
|
|
|
pub fn login_password(
|
|
|
|
|
&self,
|
|
|
|
|
identifier: IdentifierType,
|
|
|
|
@ -355,6 +359,8 @@ impl Client {
|
|
|
|
|
///
|
|
|
|
|
/// You may specify a device display name if the provided device ID is not
|
|
|
|
|
/// known. It is ignored if the device ID already exists.
|
|
|
|
|
///
|
|
|
|
|
/// This request is rate-limited but does not require authentication.
|
|
|
|
|
pub fn login_token(
|
|
|
|
|
&self,
|
|
|
|
|
identifier: IdentifierType,
|
|
|
|
@ -373,6 +379,9 @@ impl Client {
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Actual method that performs the login request. Accepts a body that
|
|
|
|
|
/// should already be populated with the login-specific values needed for
|
|
|
|
|
/// that particular login type.
|
|
|
|
|
fn login(
|
|
|
|
|
&self,
|
|
|
|
|
body: Value,
|
|
|
|
|