mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-23 23:02:23 +00:00
moar temporary debug printfs
This commit is contained in:
parent
287c19e822
commit
c78792a705
@ -1333,13 +1333,18 @@ void EmbeddedNetworkController::_request(
|
|||||||
bool memberSSOExempt = OSUtils::jsonBool(member["ssoExempt"], false);
|
bool memberSSOExempt = OSUtils::jsonBool(member["ssoExempt"], false);
|
||||||
|
|
||||||
if (networkSSOEnabled && !memberSSOExempt) {
|
if (networkSSOEnabled && !memberSSOExempt) {
|
||||||
|
std::string memberId = member["id"];
|
||||||
|
fprintf(stderr, "ssoEnabled && !ssoExempt %s-%s\n", nwids, memberId.c_str());
|
||||||
int64_t authenticationExpiryTime = (int64_t)OSUtils::jsonInt(member["authenticationExpiryTime"], 0);
|
int64_t authenticationExpiryTime = (int64_t)OSUtils::jsonInt(member["authenticationExpiryTime"], 0);
|
||||||
|
fprintf(stder, "authExpiryTime: %l\n", authenticationExpiryTime);
|
||||||
if ((authenticationExpiryTime == 0) || (authenticationExpiryTime < now)) {
|
if ((authenticationExpiryTime == 0) || (authenticationExpiryTime < now)) {
|
||||||
|
|
||||||
Dictionary<1024> authInfo;
|
Dictionary<1024> authInfo;
|
||||||
std::string authenticationURL = _db.getSSOAuthURL(member);
|
std::string authenticationURL = _db.getSSOAuthURL(member);
|
||||||
if (!authenticationURL.empty()) {
|
if (!authenticationURL.empty()) {
|
||||||
authInfo.add("aU", authenticationURL.c_str());
|
authInfo.add("aU", authenticationURL.c_str());
|
||||||
}
|
}
|
||||||
|
fprintf(stderr, "sending auth URL: %s\n", authenticationURL.c_str());
|
||||||
_sender->ncSendError(nwid,requestPacketId,identity.address(),NetworkController::NC_ERROR_AUTHENTICATION_REQUIRED, authInfo.data(), authInfo.sizeBytes());
|
_sender->ncSendError(nwid,requestPacketId,identity.address(),NetworkController::NC_ERROR_AUTHENTICATION_REQUIRED, authInfo.data(), authInfo.sizeBytes());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user