mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-07-10 23:33:05 -07:00
for now, only enable sso on certain platforms
mac, windows, linux x86/x86_64/aarch64
This commit is contained in:
parent
b7952d7f39
commit
aa97aabb4e
6 changed files with 139 additions and 94 deletions
|
@ -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 {
|
|||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue