Fixing token revocatiopn/

This commit is contained in:
stephb9959
2021-11-13 16:44:51 -08:00
parent 4b982bf64b
commit c204d34bf4

View File

@@ -72,11 +72,11 @@ namespace OpenWifi {
return false;
auto Client = UserCache_.get(CallToken);
if( Client.isNull() ) {
std::cout << "Fetching token from disk and updating cache: " << __LINE__<< std::endl;
std::cout << "Fetching token from disk and updating cache: " << CallToken << " >" <<__LINE__<< std::endl;
if(StorageService()->GetToken(CallToken,UInfo)) {
Expired = (Client->webtoken.created_ + Client->webtoken.expires_in_) < time(nullptr);
if(StorageService()->GetUserById(UInfo.userinfo.Id,UInfo.userinfo)) {
std::cout << "Fetching token from disk and updating cache: " << __LINE__<< std::endl;
std::cout << "Fetching token from disk and updating cache: " << CallToken << " >" <<__LINE__<< std::endl;
UserCache_.update(UInfo.webtoken.access_token_, UInfo);
SessionToken = CallToken;
return true;