client-api: Don't include password in Debug-format of login::Password
This commit is contained in:
parent
146c237ec4
commit
d14cd4e697
@ -5,7 +5,7 @@ pub mod v3 {
|
|||||||
//!
|
//!
|
||||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3login
|
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3login
|
||||||
|
|
||||||
use std::time::Duration;
|
use std::{fmt, time::Duration};
|
||||||
|
|
||||||
use ruma_common::{
|
use ruma_common::{
|
||||||
api::ruma_api,
|
api::ruma_api,
|
||||||
@ -227,8 +227,9 @@ pub mod v3 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// An identifier and password to supply as authentication.
|
/// An identifier and password to supply as authentication.
|
||||||
#[derive(Clone, Debug, Incoming, Serialize)]
|
#[derive(Clone, Incoming, Serialize)]
|
||||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||||
|
#[incoming_derive(!Debug)]
|
||||||
#[serde(tag = "type", rename = "m.login.password")]
|
#[serde(tag = "type", rename = "m.login.password")]
|
||||||
pub struct Password<'a> {
|
pub struct Password<'a> {
|
||||||
/// Identification information for the user.
|
/// Identification information for the user.
|
||||||
@ -252,6 +253,20 @@ pub mod v3 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'a> fmt::Debug for Password<'a> {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
|
f.debug_struct("Password").field("identifier", &self.identifier).finish_non_exhaustive()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl fmt::Debug for IncomingPassword {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
|
f.debug_struct("IncomingPassword")
|
||||||
|
.field("identifier", &self.identifier)
|
||||||
|
.finish_non_exhaustive()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// A token to supply as authentication.
|
/// A token to supply as authentication.
|
||||||
#[derive(Clone, Debug, Incoming, Serialize)]
|
#[derive(Clone, Debug, Incoming, Serialize)]
|
||||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user