Update r0::account::change_password to r0.6.0
This commit is contained in:
parent
e7db530782
commit
c455020802
@ -5,6 +5,7 @@ Breaking changes:
|
|||||||
* Move `r0::directory::get_public_rooms::PublicRoomsChunk` to `r0::directory::PublicRoomsChunk`
|
* Move `r0::directory::get_public_rooms::PublicRoomsChunk` to `r0::directory::PublicRoomsChunk`
|
||||||
* Move `r0::room::create_room::Visibility` to `r0::room::Visibility`
|
* Move `r0::room::create_room::Visibility` to `r0::room::Visibility`
|
||||||
* Our Minimum Supported Rust Version is now 1.36.0
|
* Our Minimum Supported Rust Version is now 1.36.0
|
||||||
|
* Move `r0::account::register::AuthenticationData` to `r0::account::AuthenticationData`
|
||||||
|
|
||||||
Improvements:
|
Improvements:
|
||||||
|
|
||||||
@ -13,3 +14,5 @@ Improvements:
|
|||||||
* Add `filter` optional parameter to `r0::sync::get_message_events` (introduced upstream in r0.3.0)
|
* Add `filter` optional parameter to `r0::sync::get_message_events` (introduced upstream in r0.3.0)
|
||||||
* Add `r0::appservice::set_room_visibility` (part of application service extensions for the client-server API)
|
* Add `r0::appservice::set_room_visibility` (part of application service extensions for the client-server API)
|
||||||
* Add `contains_url` to `r0::filter::RoomEventFilter` (introduced upstream in r0.3.0)
|
* Add `contains_url` to `r0::filter::RoomEventFilter` (introduced upstream in r0.3.0)
|
||||||
|
* Update `r0::account::change_password` from r0.3.0 to r0.6.0
|
||||||
|
* Add optional `auth` field
|
||||||
|
@ -6,3 +6,15 @@ pub mod register;
|
|||||||
pub mod request_password_change_token;
|
pub mod request_password_change_token;
|
||||||
pub mod request_register_token;
|
pub mod request_register_token;
|
||||||
pub mod whoami;
|
pub mod whoami;
|
||||||
|
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
/// Additional authentication information for the user-interactive authentication API.
|
||||||
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
|
pub struct AuthenticationData {
|
||||||
|
/// The login type that the client is attempting to complete.
|
||||||
|
#[serde(rename = "type")]
|
||||||
|
kind: String,
|
||||||
|
/// The value of the session key given by the homeserver.
|
||||||
|
session: Option<String>,
|
||||||
|
}
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
//! [POST /_matrix/client/r0/account/password](https://matrix.org/docs/spec/client_server/r0.4.0.html#post-matrix-client-r0-account-password)
|
//! [POST /_matrix/client/r0/account/password](https://matrix.org/docs/spec/client_server/r0.6.0#post-matrix-client-r0-account-password)
|
||||||
|
|
||||||
use ruma_api::ruma_api;
|
use ruma_api::ruma_api;
|
||||||
|
|
||||||
|
use super::AuthenticationData;
|
||||||
|
|
||||||
ruma_api! {
|
ruma_api! {
|
||||||
metadata {
|
metadata {
|
||||||
description: "Change the password of the current user's account.",
|
description: "Change the password of the current user's account.",
|
||||||
@ -15,7 +17,8 @@ ruma_api! {
|
|||||||
request {
|
request {
|
||||||
/// The new password for the account.
|
/// The new password for the account.
|
||||||
pub new_password: String,
|
pub new_password: String,
|
||||||
// TODO: missing `auth` field
|
/// Additional authentication information for the user-interactive authentication API.
|
||||||
|
pub auth: Option<AuthenticationData>,
|
||||||
}
|
}
|
||||||
|
|
||||||
response {}
|
response {}
|
||||||
|
@ -4,6 +4,8 @@ use ruma_api::ruma_api;
|
|||||||
use ruma_identifiers::UserId;
|
use ruma_identifiers::UserId;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
use super::AuthenticationData;
|
||||||
|
|
||||||
ruma_api! {
|
ruma_api! {
|
||||||
metadata {
|
metadata {
|
||||||
description: "Register an account on this homeserver.",
|
description: "Register an account on this homeserver.",
|
||||||
@ -73,16 +75,6 @@ ruma_api! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Additional authentication information for the user-interactive authentication API.
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
|
||||||
pub struct AuthenticationData {
|
|
||||||
/// The login type that the client is attempting to complete.
|
|
||||||
#[serde(rename = "type")]
|
|
||||||
kind: String,
|
|
||||||
/// The value of the session key given by the homeserver.
|
|
||||||
session: Option<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The kind of account being registered.
|
/// The kind of account being registered.
|
||||||
#[derive(Copy, Clone, Debug, Deserialize, Serialize)]
|
#[derive(Copy, Clone, Debug, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "snake_case")]
|
#[serde(rename_all = "snake_case")]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user