mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
synced 2025-11-01 11:17:51 +00:00
framework update
This commit is contained in:
@@ -142,7 +142,7 @@ namespace OpenWifi::SecurityObjects {
|
|||||||
field_to_json(Obj,"primary", primary);
|
field_to_json(Obj,"primary", primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MobilePhoneNumber::from_json(Poco::JSON::Object::Ptr &Obj) {
|
bool MobilePhoneNumber::from_json(const Poco::JSON::Object::Ptr &Obj) {
|
||||||
try {
|
try {
|
||||||
field_from_json(Obj,"number",number);
|
field_from_json(Obj,"number",number);
|
||||||
field_from_json(Obj,"verified",verified);
|
field_from_json(Obj,"verified",verified);
|
||||||
@@ -159,7 +159,7 @@ namespace OpenWifi::SecurityObjects {
|
|||||||
field_to_json(Obj,"method", method);
|
field_to_json(Obj,"method", method);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MfaAuthInfo::from_json(Poco::JSON::Object::Ptr &Obj) {
|
bool MfaAuthInfo::from_json(const Poco::JSON::Object::Ptr &Obj) {
|
||||||
try {
|
try {
|
||||||
field_from_json(Obj,"enabled",enabled);
|
field_from_json(Obj,"enabled",enabled);
|
||||||
field_from_json(Obj,"method",method);
|
field_from_json(Obj,"method",method);
|
||||||
@@ -176,7 +176,7 @@ namespace OpenWifi::SecurityObjects {
|
|||||||
field_to_json(Obj, "authenticatorSecret", authenticatorSecret);
|
field_to_json(Obj, "authenticatorSecret", authenticatorSecret);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UserLoginLoginExtensions::from_json(Poco::JSON::Object::Ptr &Obj) {
|
bool UserLoginLoginExtensions::from_json(const Poco::JSON::Object::Ptr &Obj) {
|
||||||
try {
|
try {
|
||||||
field_from_json(Obj, "mobiles",mobiles);
|
field_from_json(Obj, "mobiles",mobiles);
|
||||||
field_from_json(Obj, "mfa",mfa);
|
field_from_json(Obj, "mfa",mfa);
|
||||||
@@ -195,7 +195,7 @@ namespace OpenWifi::SecurityObjects {
|
|||||||
field_to_json(Obj, "method", method);
|
field_to_json(Obj, "method", method);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MFAChallengeRequest::from_json(Poco::JSON::Object::Ptr &Obj) {
|
bool MFAChallengeRequest::from_json(const Poco::JSON::Object::Ptr &Obj) {
|
||||||
try {
|
try {
|
||||||
field_from_json(Obj,"uuid",uuid);
|
field_from_json(Obj,"uuid",uuid);
|
||||||
field_from_json(Obj,"question",question);
|
field_from_json(Obj,"question",question);
|
||||||
@@ -213,7 +213,7 @@ namespace OpenWifi::SecurityObjects {
|
|||||||
field_to_json(Obj, "answer", answer);
|
field_to_json(Obj, "answer", answer);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MFAChallengeResponse::from_json(Poco::JSON::Object::Ptr &Obj) {
|
bool MFAChallengeResponse::from_json(const Poco::JSON::Object::Ptr &Obj) {
|
||||||
try {
|
try {
|
||||||
field_from_json(Obj,"uuid",uuid);
|
field_from_json(Obj,"uuid",uuid);
|
||||||
field_from_json(Obj,"answer",answer);
|
field_from_json(Obj,"answer",answer);
|
||||||
@@ -398,7 +398,7 @@ namespace OpenWifi::SecurityObjects {
|
|||||||
field_to_json(Obj,"note", note);
|
field_to_json(Obj,"note", note);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NoteInfo::from_json(Poco::JSON::Object::Ptr &Obj) {
|
bool NoteInfo::from_json(const Poco::JSON::Object::Ptr &Obj) {
|
||||||
try {
|
try {
|
||||||
std::ostringstream OO;
|
std::ostringstream OO;
|
||||||
Obj->stringify(OO);
|
Obj->stringify(OO);
|
||||||
@@ -447,7 +447,7 @@ namespace OpenWifi::SecurityObjects {
|
|||||||
field_to_json<ResourceAccessType>(Obj,"access", access, ResourceAccessTypeToString);
|
field_to_json<ResourceAccessType>(Obj,"access", access, ResourceAccessTypeToString);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ProfileAction::from_json(Poco::JSON::Object::Ptr &Obj) {
|
bool ProfileAction::from_json(const Poco::JSON::Object::Ptr &Obj) {
|
||||||
try {
|
try {
|
||||||
field_from_json(Obj,"resource",resource);
|
field_from_json(Obj,"resource",resource);
|
||||||
field_from_json<ResourceAccessType>(Obj,"access",access,ResourceAccessTypeFromString );
|
field_from_json<ResourceAccessType>(Obj,"access",access,ResourceAccessTypeFromString );
|
||||||
@@ -467,7 +467,7 @@ namespace OpenWifi::SecurityObjects {
|
|||||||
field_to_json(Obj,"notes", notes);
|
field_to_json(Obj,"notes", notes);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SecurityProfile::from_json(Poco::JSON::Object::Ptr &Obj) {
|
bool SecurityProfile::from_json(const Poco::JSON::Object::Ptr &Obj) {
|
||||||
try {
|
try {
|
||||||
field_from_json(Obj,"id",id);
|
field_from_json(Obj,"id",id);
|
||||||
field_from_json(Obj,"name",name);
|
field_from_json(Obj,"name",name);
|
||||||
@@ -486,7 +486,7 @@ namespace OpenWifi::SecurityObjects {
|
|||||||
field_to_json(Obj, "profiles", profiles);
|
field_to_json(Obj, "profiles", profiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SecurityProfileList::from_json(Poco::JSON::Object::Ptr &Obj) {
|
bool SecurityProfileList::from_json(const Poco::JSON::Object::Ptr &Obj) {
|
||||||
try {
|
try {
|
||||||
field_from_json(Obj,"profiles",profiles);
|
field_from_json(Obj,"profiles",profiles);
|
||||||
return true;
|
return true;
|
||||||
@@ -512,7 +512,7 @@ namespace OpenWifi::SecurityObjects {
|
|||||||
field_to_json(Obj,"userAction",userAction);
|
field_to_json(Obj,"userAction",userAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ActionLink::from_json(Poco::JSON::Object::Ptr &Obj) {
|
bool ActionLink::from_json(const Poco::JSON::Object::Ptr &Obj) {
|
||||||
try {
|
try {
|
||||||
field_from_json(Obj,"id",id);
|
field_from_json(Obj,"id",id);
|
||||||
field_from_json(Obj,"action",action);
|
field_from_json(Obj,"action",action);
|
||||||
@@ -540,7 +540,7 @@ namespace OpenWifi::SecurityObjects {
|
|||||||
field_to_json(Obj,"data",data);
|
field_to_json(Obj,"data",data);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Preferences::from_json(Poco::JSON::Object::Ptr &Obj) {
|
bool Preferences::from_json(const Poco::JSON::Object::Ptr &Obj) {
|
||||||
try {
|
try {
|
||||||
field_from_json(Obj,"id",id);
|
field_from_json(Obj,"id",id);
|
||||||
field_from_json(Obj,"modified",modified);
|
field_from_json(Obj,"modified",modified);
|
||||||
@@ -559,7 +559,7 @@ namespace OpenWifi::SecurityObjects {
|
|||||||
field_to_json(Obj,"email",email);
|
field_to_json(Obj,"email",email);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SubMfaConfig::from_json(Poco::JSON::Object::Ptr &Obj) {
|
bool SubMfaConfig::from_json(const Poco::JSON::Object::Ptr &Obj) {
|
||||||
try {
|
try {
|
||||||
field_from_json(Obj,"id",id);
|
field_from_json(Obj,"id",id);
|
||||||
field_from_json(Obj,"type",type);
|
field_from_json(Obj,"type",type);
|
||||||
@@ -583,7 +583,7 @@ namespace OpenWifi::SecurityObjects {
|
|||||||
field_to_json(Obj,"revocationDate",revocationDate);
|
field_to_json(Obj,"revocationDate",revocationDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Token::from_json(Poco::JSON::Object::Ptr &Obj) {
|
bool Token::from_json(const Poco::JSON::Object::Ptr &Obj) {
|
||||||
try {
|
try {
|
||||||
field_from_json(Obj,"token",token);
|
field_from_json(Obj,"token",token);
|
||||||
field_from_json(Obj,"refreshToken",refreshToken);
|
field_from_json(Obj,"refreshToken",refreshToken);
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ namespace OpenWifi {
|
|||||||
std::string note;
|
std::string note;
|
||||||
|
|
||||||
void to_json(Poco::JSON::Object &Obj) const;
|
void to_json(Poco::JSON::Object &Obj) const;
|
||||||
bool from_json(Poco::JSON::Object::Ptr &Obj);
|
bool from_json(const Poco::JSON::Object::Ptr &Obj);
|
||||||
};
|
};
|
||||||
typedef std::vector<NoteInfo> NoteInfoVec;
|
typedef std::vector<NoteInfo> NoteInfoVec;
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ namespace OpenWifi {
|
|||||||
bool primary = false;
|
bool primary = false;
|
||||||
|
|
||||||
void to_json(Poco::JSON::Object &Obj) const;
|
void to_json(Poco::JSON::Object &Obj) const;
|
||||||
bool from_json(Poco::JSON::Object::Ptr &Obj);
|
bool from_json(const Poco::JSON::Object::Ptr &Obj);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MfaAuthInfo {
|
struct MfaAuthInfo {
|
||||||
@@ -77,7 +77,7 @@ namespace OpenWifi {
|
|||||||
std::string method;
|
std::string method;
|
||||||
|
|
||||||
void to_json(Poco::JSON::Object &Obj) const;
|
void to_json(Poco::JSON::Object &Obj) const;
|
||||||
bool from_json(Poco::JSON::Object::Ptr &Obj);
|
bool from_json(const Poco::JSON::Object::Ptr &Obj);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct UserLoginLoginExtensions {
|
struct UserLoginLoginExtensions {
|
||||||
@@ -86,7 +86,7 @@ namespace OpenWifi {
|
|||||||
std::string authenticatorSecret;
|
std::string authenticatorSecret;
|
||||||
|
|
||||||
void to_json(Poco::JSON::Object &Obj) const;
|
void to_json(Poco::JSON::Object &Obj) const;
|
||||||
bool from_json(Poco::JSON::Object::Ptr &Obj);
|
bool from_json(const Poco::JSON::Object::Ptr &Obj);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MFAChallengeRequest {
|
struct MFAChallengeRequest {
|
||||||
@@ -96,7 +96,7 @@ namespace OpenWifi {
|
|||||||
uint64_t created = std::time(nullptr);
|
uint64_t created = std::time(nullptr);
|
||||||
|
|
||||||
void to_json(Poco::JSON::Object &Obj) const;
|
void to_json(Poco::JSON::Object &Obj) const;
|
||||||
bool from_json(Poco::JSON::Object::Ptr &Obj);
|
bool from_json(const Poco::JSON::Object::Ptr &Obj);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MFAChallengeResponse {
|
struct MFAChallengeResponse {
|
||||||
@@ -104,7 +104,7 @@ namespace OpenWifi {
|
|||||||
std::string answer;
|
std::string answer;
|
||||||
|
|
||||||
void to_json(Poco::JSON::Object &Obj) const;
|
void to_json(Poco::JSON::Object &Obj) const;
|
||||||
bool from_json(Poco::JSON::Object::Ptr &Obj);
|
bool from_json(const Poco::JSON::Object::Ptr &Obj);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct UserInfo {
|
struct UserInfo {
|
||||||
@@ -209,7 +209,7 @@ namespace OpenWifi {
|
|||||||
std::string resource;
|
std::string resource;
|
||||||
ResourceAccessType access;
|
ResourceAccessType access;
|
||||||
void to_json(Poco::JSON::Object &Obj) const;
|
void to_json(Poco::JSON::Object &Obj) const;
|
||||||
bool from_json(Poco::JSON::Object::Ptr &Obj);
|
bool from_json(const Poco::JSON::Object::Ptr &Obj);
|
||||||
};
|
};
|
||||||
typedef std::vector<ProfileAction> ProfileActionVec;
|
typedef std::vector<ProfileAction> ProfileActionVec;
|
||||||
|
|
||||||
@@ -221,14 +221,14 @@ namespace OpenWifi {
|
|||||||
std::string role;
|
std::string role;
|
||||||
NoteInfoVec notes;
|
NoteInfoVec notes;
|
||||||
void to_json(Poco::JSON::Object &Obj) const;
|
void to_json(Poco::JSON::Object &Obj) const;
|
||||||
bool from_json(Poco::JSON::Object::Ptr &Obj);
|
bool from_json(const Poco::JSON::Object::Ptr &Obj);
|
||||||
};
|
};
|
||||||
typedef std::vector<SecurityProfile> SecurityProfileVec;
|
typedef std::vector<SecurityProfile> SecurityProfileVec;
|
||||||
|
|
||||||
struct SecurityProfileList {
|
struct SecurityProfileList {
|
||||||
SecurityProfileVec profiles;
|
SecurityProfileVec profiles;
|
||||||
void to_json(Poco::JSON::Object &Obj) const;
|
void to_json(Poco::JSON::Object &Obj) const;
|
||||||
bool from_json(Poco::JSON::Object::Ptr &Obj);
|
bool from_json(const Poco::JSON::Object::Ptr &Obj);
|
||||||
};
|
};
|
||||||
|
|
||||||
enum LinkActions {
|
enum LinkActions {
|
||||||
@@ -255,7 +255,7 @@ namespace OpenWifi {
|
|||||||
bool userAction=true;
|
bool userAction=true;
|
||||||
|
|
||||||
void to_json(Poco::JSON::Object &Obj) const;
|
void to_json(Poco::JSON::Object &Obj) const;
|
||||||
bool from_json(Poco::JSON::Object::Ptr &Obj);
|
bool from_json(const Poco::JSON::Object::Ptr &Obj);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Preferences {
|
struct Preferences {
|
||||||
@@ -263,7 +263,7 @@ namespace OpenWifi {
|
|||||||
uint64_t modified;
|
uint64_t modified;
|
||||||
Types::StringPairVec data;
|
Types::StringPairVec data;
|
||||||
void to_json(Poco::JSON::Object &Obj) const;
|
void to_json(Poco::JSON::Object &Obj) const;
|
||||||
bool from_json(Poco::JSON::Object::Ptr &Obj);
|
bool from_json(const Poco::JSON::Object::Ptr &Obj);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SubMfaConfig {
|
struct SubMfaConfig {
|
||||||
@@ -273,7 +273,7 @@ namespace OpenWifi {
|
|||||||
std::string email;
|
std::string email;
|
||||||
|
|
||||||
void to_json(Poco::JSON::Object &Obj) const;
|
void to_json(Poco::JSON::Object &Obj) const;
|
||||||
bool from_json(Poco::JSON::Object::Ptr &Obj);
|
bool from_json(const Poco::JSON::Object::Ptr &Obj);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Token {
|
struct Token {
|
||||||
@@ -287,7 +287,7 @@ namespace OpenWifi {
|
|||||||
uint64_t revocationDate=0;
|
uint64_t revocationDate=0;
|
||||||
|
|
||||||
void to_json(Poco::JSON::Object &Obj) const;
|
void to_json(Poco::JSON::Object &Obj) const;
|
||||||
bool from_json(Poco::JSON::Object::Ptr &Obj);
|
bool from_json(const Poco::JSON::Object::Ptr &Obj);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Avatar {
|
struct Avatar {
|
||||||
|
|||||||
Reference in New Issue
Block a user