diff --git a/src/AuthService.cpp b/src/AuthService.cpp index b0fe6a6..a522b6f 100644 --- a/src/AuthService.cpp +++ b/src/AuthService.cpp @@ -77,7 +77,7 @@ namespace OpenWifi { std::cout << "Fetching token from disk and updating cache: " << CallToken << " >" <<__LINE__<< std::endl; if(RevocationDate!=0) return false; - Expired = (Client->webtoken.created_ + Client->webtoken.expires_in_) < time(nullptr); + Expired = (UInfo2.webtoken.created_ + UInfo2.webtoken.expires_in_) < time(nullptr); std::cout << "Fetching token from disk and updating cache: " << CallToken << " >" <<__LINE__<< std::endl; if(StorageService()->GetUserById(UInfo.userinfo.Id,UInfo.userinfo)) { std::cout << "Fetching token from disk and updating cache: " << CallToken << " >" <<__LINE__<< std::endl; diff --git a/src/storage/storage_tokens.cpp b/src/storage/storage_tokens.cpp index 4a89f4e..7450193 100644 --- a/src/storage/storage_tokens.cpp +++ b/src/storage/storage_tokens.cpp @@ -47,11 +47,8 @@ namespace OpenWifi { Poco::Data::Session Sess = Pool_->get(); Poco::Data::Statement Select(Sess); - std::cout << __func__ << " : " << __LINE__ << std::endl; RevocationDate = 0 ; - std::cout << __func__ << " : " << __LINE__ << std::endl; std::string St2{"SELECT " + AllTokensFieldsForSelect + " From Tokens WHERE Token=?"}; - std::cout << __func__ << " : " << __LINE__ << std::endl; Select << ConvertParams(St2), Poco::Data::Keywords::into(UInfo.webtoken.access_token_), Poco::Data::Keywords::into(UInfo.webtoken.refresh_token_), @@ -62,9 +59,7 @@ namespace OpenWifi { Poco::Data::Keywords::into(UInfo.webtoken.idle_timeout_), Poco::Data::Keywords::into(RevocationDate), Poco::Data::Keywords::use(Token); - std::cout << __func__ << " : " << __LINE__ << std::endl; Select.execute(); - std::cout << __func__ << " : " << __LINE__ << " Rev:" << RevocationDate << std::endl; return true; } catch (const Poco::Exception &E) { Logger_.log(E);