Completing sub mfa support.

This commit is contained in:
stephb9959
2021-12-01 22:12:28 -08:00
parent ec82bdec24
commit 2217a428c1
8 changed files with 245 additions and 16 deletions

View File

@@ -531,5 +531,26 @@ namespace OpenWifi::SecurityObjects {
}
return false;
}
void SubMfaConfig::to_json(Poco::JSON::Object &Obj) const {
field_to_json(Obj,"id",id);
field_to_json(Obj,"type",type);
field_to_json(Obj,"sms",sms);
field_to_json(Obj,"email",email);
}
bool SubMfaConfig::from_json(Poco::JSON::Object::Ptr &Obj) {
try {
field_from_json(Obj,"id",id);
field_from_json(Obj,"type",type);
field_from_json(Obj,"sms",sms);
field_from_json(Obj,"email",email);
return true;
} catch(...) {
}
return false;
}
}