Przeglądaj źródła

moar temporary debug printfs

Grant Limberg 4 lat temu
rodzic
commit
c78792a705
1 zmienionych plików z 5 dodań i 0 usunięć
  1. 5 0
      controller/EmbeddedNetworkController.cpp

+ 5 - 0
controller/EmbeddedNetworkController.cpp

@@ -1333,13 +1333,18 @@ void EmbeddedNetworkController::_request(
 	bool memberSSOExempt = OSUtils::jsonBool(member["ssoExempt"], false);
 
 	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);
+		fprintf(stder, "authExpiryTime: %l\n", authenticationExpiryTime);
 		if ((authenticationExpiryTime == 0) || (authenticationExpiryTime < now)) {
+
 			Dictionary<1024> authInfo;
 			std::string authenticationURL = _db.getSSOAuthURL(member);
 			if (!authenticationURL.empty()) {
 				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());
 			return;
 		}