Skip to main content

authentik_client/models/
captcha_challenge.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2026.2.0
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// CaptchaChallenge : Site public key
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CaptchaChallenge {
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 = "site_key")]
28    pub site_key: String,
29    #[serde(rename = "js_url")]
30    pub js_url: String,
31    #[serde(rename = "interactive")]
32    pub interactive: bool,
33}
34
35impl CaptchaChallenge {
36    /// Site public key
37    pub fn new(
38        pending_user: String,
39        pending_user_avatar: String,
40        site_key: String,
41        js_url: String,
42        interactive: bool,
43    ) -> CaptchaChallenge {
44        CaptchaChallenge {
45            flow_info: None,
46            component: None,
47            response_errors: None,
48            pending_user,
49            pending_user_avatar,
50            site_key,
51            js_url,
52            interactive,
53        }
54    }
55}