bitwarden_core/auth/login/response/two_factor/
duo.rs

1use schemars::JsonSchema;
2use serde::{Deserialize, Serialize};
3
4#[allow(missing_docs)]
5#[derive(Serialize, Deserialize, Debug, JsonSchema)]
6#[serde(rename_all = "camelCase", deny_unknown_fields)]
7pub struct Duo {
8    pub host: String,
9    pub signature: String,
10}
11
12impl From<crate::auth::api::response::two_factor_provider_data::duo::Duo> for Duo {
13    fn from(api: crate::auth::api::response::two_factor_provider_data::duo::Duo) -> Self {
14        Self {
15            host: api.host,
16            signature: api.signature,
17        }
18    }
19}
20
21impl From<crate::auth::api::response::two_factor_provider_data::organization_duo::OrganizationDuo>
22    for Duo
23{
24    fn from(
25        api: crate::auth::api::response::two_factor_provider_data::organization_duo::OrganizationDuo,
26    ) -> Self {
27        Self {
28            host: api.host,
29            signature: api.signature,
30        }
31    }
32}