authentik_rust/models/
authenticator_duo_challenge.rs1use crate::models;
12
13#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct AuthenticatorDuoChallenge {
16 #[serde(rename = "type")]
17 pub r#type: models::ChallengeChoices,
18 #[serde(rename = "flow_info", skip_serializing_if = "Option::is_none")]
19 pub flow_info: Option<Box<models::ContextualFlowInfo>>,
20 #[serde(rename = "component", skip_serializing_if = "Option::is_none")]
21 pub component: Option<String>,
22 #[serde(rename = "response_errors", skip_serializing_if = "Option::is_none")]
23 pub response_errors: Option<std::collections::HashMap<String, Vec<models::ErrorDetail>>>,
24 #[serde(rename = "pending_user")]
25 pub pending_user: String,
26 #[serde(rename = "pending_user_avatar")]
27 pub pending_user_avatar: String,
28 #[serde(rename = "activation_barcode")]
29 pub activation_barcode: String,
30 #[serde(rename = "activation_code")]
31 pub activation_code: String,
32 #[serde(rename = "stage_uuid")]
33 pub stage_uuid: String,
34}
35
36impl AuthenticatorDuoChallenge {
37 pub fn new(r#type: models::ChallengeChoices, pending_user: String, pending_user_avatar: String, activation_barcode: String, activation_code: String, stage_uuid: String) -> AuthenticatorDuoChallenge {
39 AuthenticatorDuoChallenge {
40 r#type,
41 flow_info: None,
42 component: None,
43 response_errors: None,
44 pending_user,
45 pending_user_avatar,
46 activation_barcode,
47 activation_code,
48 stage_uuid,
49 }
50 }
51}
52