client-api: Rewrap comments in uiaa
This commit is contained in:
parent
87e821094c
commit
1f8384722f
@ -19,8 +19,7 @@ use crate::error::{Error as MatrixError, ErrorBody};
|
|||||||
#[derive(Clone, Debug, Outgoing, Serialize)]
|
#[derive(Clone, Debug, Outgoing, Serialize)]
|
||||||
#[serde(untagged)]
|
#[serde(untagged)]
|
||||||
pub enum AuthData<'a> {
|
pub enum AuthData<'a> {
|
||||||
/// Used for sending UIAA authentication requests to the homeserver directly
|
/// Used for sending UIAA authentication requests to the homeserver directly from the client.
|
||||||
/// from the client.
|
|
||||||
DirectRequest {
|
DirectRequest {
|
||||||
/// The login type that the client is attempting to complete.
|
/// The login type that the client is attempting to complete.
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
@ -36,16 +35,16 @@ pub enum AuthData<'a> {
|
|||||||
auth_parameters: BTreeMap<String, JsonValue>,
|
auth_parameters: BTreeMap<String, JsonValue>,
|
||||||
},
|
},
|
||||||
|
|
||||||
/// Used by the client to acknowledge that the user has completed a UIAA
|
/// Used by the client to acknowledge that the user has completed a UIAA stage through the
|
||||||
/// stage through the fallback method.
|
/// fallback method.
|
||||||
FallbackAcknowledgement {
|
FallbackAcknowledgement {
|
||||||
/// The value of the session key given by the homeserver.
|
/// The value of the session key given by the homeserver.
|
||||||
session: &'a str,
|
session: &'a str,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Information about available authentication flows and status for
|
/// Information about available authentication flows and status for User-Interactive Authenticiation
|
||||||
/// User-Interactive Authenticiation API.
|
/// API.
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
pub struct UiaaInfo {
|
pub struct UiaaInfo {
|
||||||
/// List of authentication flows available for this endpoint.
|
/// List of authentication flows available for this endpoint.
|
||||||
@ -55,8 +54,7 @@ pub struct UiaaInfo {
|
|||||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||||
pub completed: Vec<String>,
|
pub completed: Vec<String>,
|
||||||
|
|
||||||
/// Authentication parameters required for the client to complete
|
/// Authentication parameters required for the client to complete authentication.
|
||||||
/// authentication.
|
|
||||||
///
|
///
|
||||||
/// To create a `Box<RawJsonValue>`, use `serde_json::value::to_raw_value`.
|
/// To create a `Box<RawJsonValue>`, use `serde_json::value::to_raw_value`.
|
||||||
pub params: Box<RawJsonValue>,
|
pub params: Box<RawJsonValue>,
|
||||||
@ -70,8 +68,7 @@ pub struct UiaaInfo {
|
|||||||
pub auth_error: Option<ErrorBody>,
|
pub auth_error: Option<ErrorBody>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Description of steps required to authenticate via the User-Interactive
|
/// Description of steps required to authenticate via the User-Interactive Authentication API.
|
||||||
/// Authentication API.
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
#[cfg_attr(test, derive(PartialEq))]
|
#[cfg_attr(test, derive(PartialEq))]
|
||||||
pub struct AuthFlow {
|
pub struct AuthFlow {
|
||||||
@ -80,8 +77,7 @@ pub struct AuthFlow {
|
|||||||
pub stages: Vec<String>,
|
pub stages: Vec<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Contains either a User-Interactive Authentication API response body or a
|
/// Contains either a User-Interactive Authentication API response body or a Matrix error.
|
||||||
/// Matrix error.
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub enum UiaaResponse {
|
pub enum UiaaResponse {
|
||||||
/// User-Interactive Authentication API response
|
/// User-Interactive Authentication API response
|
||||||
|
Loading…
x
Reference in New Issue
Block a user