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