for now, only enable sso on certain platforms

mac, windows, linux x86/x86_64/aarch64
This commit is contained in:
Grant Limberg 2022-02-01 11:07:37 -08:00
parent b7952d7f39
commit aa97aabb4e
No known key found for this signature in database
GPG key ID: 2BA62CCABBB4095A
6 changed files with 139 additions and 94 deletions

View file

@ -35,10 +35,28 @@ use time::{OffsetDateTime, format_description};
use url::Url;
#[cfg(
any(
all(target_os = "linux", target_arch = "x86"),
all(target_os = "linux", target_arch = "x86_64"),
all(target_os = "linux", target_arch = "aarch64"),
target_os = "windows",
target_os = "macos",
)
)]
pub struct ZeroIDC {
inner: Arc<Mutex<Inner>>,
}
#[cfg(
any(
all(target_os = "linux", target_arch = "x86"),
all(target_os = "linux", target_arch = "x86_64"),
all(target_os = "linux", target_arch = "aarch64"),
target_os = "windows",
target_os = "macos",
)
)]
struct Inner {
running: bool,
auth_endpoint: String,
@ -88,6 +106,15 @@ fn systemtime_strftime<T>(dt: T, format: &str) -> String
}
}
#[cfg(
any(
all(target_os = "linux", target_arch = "x86"),
all(target_os = "linux", target_arch = "x86_64"),
all(target_os = "linux", target_arch = "aarch64"),
target_os = "windows",
target_os = "macos",
)
)]
impl ZeroIDC {
pub fn new(
issuer: &str,
@ -606,4 +633,3 @@ impl ZeroIDC {
};
}
}