proxmox_api/generated/access/openid/
login.rs1pub struct LoginClient<T> {
2 client: T,
3 path: String,
4}
5impl<T> LoginClient<T>
6where
7 T: crate::client::Client,
8{
9 pub fn new(client: T, parent_path: &str) -> Self {
10 Self {
11 client,
12 path: format!("{}{}", parent_path, "/login"),
13 }
14 }
15}
16impl<T> LoginClient<T>
17where
18 T: crate::client::Client,
19{
20 #[doc = " Verify OpenID authorization code and create a ticket."]
21 pub fn post(&self, params: PostParams) -> Result<(), T::Error> {
22 let path = self.path.to_string();
23 self.client.post(&path, ¶ms)
24 }
25}
26impl PostParams {
27 pub fn new(code: String, redirect_url: String, state: String) -> Self {
28 Self {
29 code,
30 redirect_url,
31 state,
32 additional_properties: Default::default(),
33 }
34 }
35}
36#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
37pub struct PostParams {
38 #[doc = "OpenId authorization code."]
39 pub code: String,
40 #[serde(rename = "redirect-url")]
41 #[doc = "Redirection Url. The client should set this to the used server url (location.origin)."]
42 pub redirect_url: String,
43 #[doc = "OpenId state."]
44 pub state: String,
45 #[serde(
46 flatten,
47 default,
48 skip_serializing_if = "::std::collections::HashMap::is_empty"
49 )]
50 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
51}