CLI printing of URL.
This commit is contained in:
parent
8bb5bc736d
commit
2c1d7f3dcc
3 changed files with 16 additions and 10 deletions
8
one.cpp
8
one.cpp
|
@ -794,6 +794,14 @@ 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 (n["status"] == "AUTHENTICATION_REQUIRED") {
|
||||
printf(" SSO authentication required, URL: %s" ZT_EOL_S, OSUtils::jsonString(n["authenticationURL"], "(null)").c_str());
|
||||
} else {
|
||||
printf(" SSO authentication expires in %lld" ZT_EOL_S, (authenticationExpiryTime - OSUtils::now()) / 1000LL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue