diff options
| author | Grant Limberg <[email protected]> | 2021-06-05 13:44:45 -0700 |
|---|---|---|
| committer | Grant Limberg <[email protected]> | 2021-06-05 13:44:45 -0700 |
| commit | 364ad87e2b9b7a7a7af2377f29ede5e749e93910 (patch) | |
| tree | e10676f8148b86b028030540e49c635fceef1ecb /one.cpp | |
| parent | 9380ef708ac528c349a290ddf6e9b92a561e4539 (diff) | |
add ssoEnabled flag to network config
Diffstat (limited to 'one.cpp')
| -rw-r--r-- | one.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); } } } |
