1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* Hanzo Cloud API
*
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SessionUser {
/// Groups is the caller's group list, always empty here: this console authorizes on the platform SuperAdmin fact alone, not on argocd RBAC groups. Absent for an anonymous caller.
#[serde(rename = "groups", skip_serializing_if = "Option::is_none")]
pub groups: Option<Vec<String>>,
/// Iss is the token issuer as the SPA expects to see it — the literal \"argocd\", so the UI never triggers an SSO redirect of its own. Absent for an anonymous caller.
#[serde(rename = "iss", skip_serializing_if = "Option::is_none")]
pub iss: Option<String>,
/// LoggedIn reports whether this browser holds a session this console accepts.
#[serde(rename = "loggedIn", skip_serializing_if = "Option::is_none")]
pub logged_in: Option<bool>,
/// LoginURL is where an anonymous caller signs in. Absent once signed in.
#[serde(rename = "loginUrl", skip_serializing_if = "Option::is_none")]
pub login_url: Option<String>,
/// LogoutURL is where a signed-in caller ends the session. Absent when anonymous.
#[serde(rename = "logoutUrl", skip_serializing_if = "Option::is_none")]
pub logout_url: Option<String>,
/// Username is the validated principal's user ID — the opaque gateway id, which is what argocd's UI renders as the signed-in user here — or \"admin\" when the principal carries none. Absent when anonymous.
#[serde(rename = "username", skip_serializing_if = "Option::is_none")]
pub username: Option<String>,
}
impl SessionUser {
pub fn new() -> SessionUser {
SessionUser {
groups: None,
iss: None,
logged_in: None,
login_url: None,
logout_url: None,
username: None,
}
}
}