diff options
author | cel 🌸 <cel@blos.sm> | 2023-07-04 21:27:15 +0100 |
---|---|---|
committer | cel 🌸 <cel@blos.sm> | 2023-07-04 21:27:15 +0100 |
commit | 143a0365d0822e6786cdac3530a725bbf450f38f (patch) | |
tree | 8b540aa73c1365ddc658e502ed93847dbb522064 /src/stanza/sasl.rs | |
parent | c0a7116eef13ea75340fe7d75da97dfbd04fac20 (diff) | |
download | luz-143a0365d0822e6786cdac3530a725bbf450f38f.tar.gz luz-143a0365d0822e6786cdac3530a725bbf450f38f.tar.bz2 luz-143a0365d0822e6786cdac3530a725bbf450f38f.zip |
horrible
Diffstat (limited to 'src/stanza/sasl.rs')
-rw-r--r-- | src/stanza/sasl.rs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/stanza/sasl.rs b/src/stanza/sasl.rs new file mode 100644 index 0000000..c0e41ab --- /dev/null +++ b/src/stanza/sasl.rs @@ -0,0 +1,32 @@ +use serde::{Deserialize, Serialize}; + +#[derive(Deserialize, PartialEq, Debug)] +pub struct Mechanisms { + #[serde(rename = "$value")] + pub mechanisms: Vec<Mechanism>, +} + +#[derive(Deserialize, PartialEq, Debug)] +pub struct Mechanism { + #[serde(rename = "$text")] + pub mechanism: String, +} + +#[derive(Serialize, Debug)] +#[serde(rename = "auth")] +pub struct Auth { + #[serde(rename = "@xmlns")] + pub ns: String, + #[serde(rename = "@mechanism")] + pub mechanism: String, + #[serde(rename = "$text")] + pub sasl_data: Option<String>, +} + +#[derive(Deserialize, Debug)] +pub struct Challenge { + #[serde(rename = "@xmlns")] + pub ns: String, + #[serde(rename = "$text")] + pub sasl_data: String, +} |