proxmox_api/generated/access/openid/
auth_url.rs

1pub struct AuthUrlClient<T> {
2    client: T,
3    path: String,
4}
5impl<T> AuthUrlClient<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, "/auth-url"),
13        }
14    }
15}
16impl<T> AuthUrlClient<T>
17where
18    T: crate::client::Client,
19{
20    #[doc = "Get the OpenId Authorization Url for the specified realm."]
21    pub fn post(&self, params: PostParams) -> Result<String, T::Error> {
22        let path = self.path.to_string();
23        self.client.post(&path, &params)
24    }
25}
26impl PostParams {
27    pub fn new(realm: String, redirect_url: String) -> Self {
28        Self {
29            realm,
30            redirect_url,
31            additional_properties: Default::default(),
32        }
33    }
34}
35#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
36pub struct PostParams {
37    #[doc = "Authentication domain ID"]
38    pub realm: String,
39    #[serde(rename = "redirect-url")]
40    #[doc = "Redirection Url. The client should set this to the used server url (location.origin)."]
41    pub redirect_url: String,
42    #[serde(
43        flatten,
44        default,
45        skip_serializing_if = "::std::collections::HashMap::is_empty"
46    )]
47    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
48}