Several more SSO/OIDC related fixes, and bump version to 1.8.9.

This commit is contained in:
Adam Ierymenko 2022-04-19 21:29:11 -04:00
parent ef08346a74
commit ee0a194b25
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3
8 changed files with 27 additions and 21 deletions

View file

@ -775,7 +775,12 @@ static int cli(int argc,char **argv)
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, ((int64_t)authenticationExpiryTime - OSUtils::now()) / 1000LL);
int64_t expiresIn = ((int64_t)authenticationExpiryTime - OSUtils::now()) / 1000LL;
if (expiresIn >= 0) {
printf(" AUTH OK, expires in: %lld seconds" ZT_EOL_S, expiresIn);
} else {
printf(" AUTH OK, refreshing..." ZT_EOL_S);
}
}
}
}