Skip to main content

clientapi_pbs/models/
access_openid_create_login_response_data.rs

1/*
2 * Proxmox Backup Server API
3 *
4 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pbs.proxmox.com/docs/api-viewer/ for the upstream documentation.
5 *
6 * The version of the OpenAPI document: 9.x
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct AccessOpenidCreateLoginResponseData {
16
17    /// Cross Site Request Forgery Prevention Token.
18    #[serde(rename = "CSRFPreventionToken")]
19    pub csrf_prevention_token: String,
20
21    /// Auth ticket, present if http-only was not provided or is false.
22    #[serde(rename = "ticket", skip_serializing_if = "Option::is_none")]
23    pub ticket: Option<String>,
24
25    /// Informational ticket, can only be used to check if the ticket is expired. Present if http-only was true.
26    #[serde(rename = "ticket-info", skip_serializing_if = "Option::is_none")]
27    pub ticket_info: Option<String>,
28
29    /// User name.
30    #[serde(rename = "username")]
31    pub username: String,
32
33
34}
35
36impl AccessOpenidCreateLoginResponseData {
37    pub fn new(csrf_prevention_token: String, username: String) -> AccessOpenidCreateLoginResponseData {
38        AccessOpenidCreateLoginResponseData {
39            
40            csrf_prevention_token,
41            
42            ticket: None,
43            
44            ticket_info: None,
45            
46            username,
47            
48        }
49    }
50}
51
52