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
/*
* Artifact Keeper API
*
* Enterprise artifact registry supporting 45+ package formats.
*
* The version of the OpenAPI document: 1.2.1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// AuthConfig : Authentication provider availability.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AuthConfig {
/// Whether an LDAP directory is configured.
#[serde(rename = "ldap_enabled")]
pub ldap_enabled: bool,
/// Whether an OIDC provider is configured.
#[serde(rename = "oidc_enabled")]
pub oidc_enabled: bool,
/// Whether SAML SSO is configured (derived from the SSO admin settings in the DB, but for this endpoint we report whether the OIDC issuer is set as a proxy).
#[serde(rename = "sso_enabled")]
pub sso_enabled: bool,
}
impl AuthConfig {
/// Authentication provider availability.
pub fn new(ldap_enabled: bool, oidc_enabled: bool, sso_enabled: bool) -> AuthConfig {
AuthConfig {
ldap_enabled,
oidc_enabled,
sso_enabled,
}
}
}