summaryrefslogtreecommitdiff
path: root/one.cpp
diff options
context:
space:
mode:
authorGrant Limberg <[email protected]>2021-06-05 13:44:45 -0700
committerGrant Limberg <[email protected]>2021-06-05 13:44:45 -0700
commit364ad87e2b9b7a7a7af2377f29ede5e749e93910 (patch)
treee10676f8148b86b028030540e49c635fceef1ecb /one.cpp
parent9380ef708ac528c349a290ddf6e9b92a561e4539 (diff)
add ssoEnabled flag to network config
Diffstat (limited to 'one.cpp')
-rw-r--r--one.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/one.cpp b/one.cpp
index eb3198e7..3d09245b 100644
--- a/one.cpp
+++ b/one.cpp
@@ -795,12 +795,12 @@ static int cli(int argc,char **argv)
OSUtils::jsonString(n["type"],"-").c_str(),
OSUtils::jsonString(n["portDeviceName"],"-").c_str(),
aa.c_str());
- int64_t authenticationExpiryTime = n["authenticationExpiryTime"];
- if (authenticationExpiryTime >= 0) {
+ if (OSUtils::jsonBool(n["ssoEnabled"], false)) {
+ uint64_t authenticationExpiryTime = n["authenticationExpiryTime"];
if (status == "AUTHENTICATION_REQUIRED") {
printf(" AUTH EXPIRED, URL: %s" ZT_EOL_S, OSUtils::jsonString(n["authenticationURL"], "(null)").c_str());
} else if (status == "OK") {
- printf(" AUTH OK, expires in: %lld seconds" ZT_EOL_S, (authenticationExpiryTime - OSUtils::now()) / 1000LL);
+ printf(" AUTH OK, expires in: %lld seconds" ZT_EOL_S, ((int64_t)authenticationExpiryTime - OSUtils::now()) / 1000LL);
}
}
}