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::Session Sess = Pool_->get();
Poco::Data::Statement Select(Sess); Poco::Data::Statement Select(Sess);
std::cout << __func__ << " : " << __LINE__ << std::endl;
RevocationDate = 0 ; RevocationDate = 0 ;
std::cout << __func__ << " : " << __LINE__ << std::endl;
std::string St2{"SELECT " + AllTokensValuesForSelect + " From Tokens WHERE Token=?"}; std::string St2{"SELECT " + AllTokensValuesForSelect + " From Tokens WHERE Token=?"};
std::cout << __func__ << " : " << __LINE__ << std::endl;
Select << ConvertParams(St2), Select << ConvertParams(St2),
Poco::Data::Keywords::into(UInfo.webtoken.access_token_), Poco::Data::Keywords::into(UInfo.webtoken.access_token_),
Poco::Data::Keywords::into(UInfo.webtoken.refresh_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(UInfo.webtoken.idle_timeout_),
Poco::Data::Keywords::into(RevocationDate), Poco::Data::Keywords::into(RevocationDate),
Poco::Data::Keywords::use(Token); Poco::Data::Keywords::use(Token);
std::cout << __func__ << " : " << __LINE__ << std::endl;
Select.execute(); Select.execute();
std::cout << __func__ << " : " << __LINE__ << " Rev:" << RevocationDate << std::endl;
if(RevocationDate>0)
return false;
return true; return true;
} catch (const Poco::Exception &E) { } catch (const Poco::Exception &E) {
Logger_.log(E); Logger_.log(E);