mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
synced 2025-10-29 18:02:29 +00:00
Fixing token revocatiopn/
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user