Fixing MFA UUID issue.

This commit is contained in:
stephb9959
2021-11-12 08:20:16 -08:00
parent 9095d831db
commit 12fddd8bc4
3 changed files with 1 additions and 18 deletions

View File

@@ -101,27 +101,16 @@ namespace OpenWifi {
return UnAuthorized(RESTAPI::Errors::InvalidCredentials);
}
std::cout << __func__ << ":" << __LINE__ << std::endl;
if(GetBoolParameter(RESTAPI::Protocol::COMPLETEMFACHALLENGE,false)) {
std::cout << __func__ << ":" << __LINE__ << std::endl;
Logger_.information(Poco::format("COMPLETE-MFA-CHALLENGE(%s): Request for %s", Request->clientAddress().toString(), userId));
std::cout << __func__ << ":" << __LINE__ << std::endl;
if(Obj->has("uuid")) {
std::cout << __func__ << ":" << __LINE__ << std::endl;
SecurityObjects::UserInfoAndPolicy UInfo;
std::cout << __func__ << ":" << __LINE__ << std::endl;
if(MFAServer().CompleteMFAChallenge(Obj,UInfo)) {
std::cout << __func__ << ":" << __LINE__ << std::endl;
Poco::JSON::Object ReturnObj;
std::cout << __func__ << ":" << __LINE__ << std::endl;
UInfo.webtoken.to_json(ReturnObj);
std::cout << __func__ << ":" << __LINE__ << std::endl;
return ReturnObject(ReturnObj);
}
std::cout << __func__ << ":" << __LINE__ << std::endl;
}
std::cout << __func__ << ":" << __LINE__ << std::endl;
return UnAuthorized(RESTAPI::Errors::InvalidCredentials);
}