Fixing token revocatiopn/

This commit is contained in:
stephb9959
2021-11-13 17:06:52 -08:00
parent 5b96ef396f
commit f1a2ba90f6

View File

@@ -47,9 +47,11 @@ 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 " + AllTokensValuesForSelect + " 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_),
@@ -60,10 +62,9 @@ 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();
if(RevocationDate>0)
return false;
std::cout << __func__ << " : " << __LINE__ << " Rev:" << RevocationDate << std::endl;
return true;
} catch (const Poco::Exception &E) {
Logger_.log(E);