authentik_rust/models/
apple_login_challenge.rs1use crate::models;
12
13#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct AppleLoginChallenge {
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 = "client_id")]
25 pub client_id: String,
26 #[serde(rename = "scope")]
27 pub scope: String,
28 #[serde(rename = "redirect_uri")]
29 pub redirect_uri: String,
30 #[serde(rename = "state")]
31 pub state: String,
32}
33
34impl AppleLoginChallenge {
35 pub fn new(r#type: models::ChallengeChoices, client_id: String, scope: String, redirect_uri: String, state: String) -> AppleLoginChallenge {
37 AppleLoginChallenge {
38 r#type,
39 flow_info: None,
40 component: None,
41 response_errors: None,
42 client_id,
43 scope,
44 redirect_uri,
45 state,
46 }
47 }
48}
49