Skip to main content

authentik_client/models/
session_end_challenge.rs

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