Fix for subscriber authentication tokens.

This commit is contained in:
stephb9959
2021-12-13 19:23:52 -08:00
parent 5ff0841112
commit be46b46340
2 changed files with 4 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ namespace OpenWifi {
void RESTAPI_submfa_handler::DoGet() {
SecurityObjects::UserInfo User;
std::cout << "submfa get " << UserInfo_.userinfo.Id << " user:" << UserInfo_.userinfo.email << std::endl;
// std::cout << "submfa get " << UserInfo_.userinfo.Id << " user:" << UserInfo_.userinfo.email << std::endl;
if (StorageService()->GetSubUserById(UserInfo_.userinfo.Id,User)) {
Poco::JSON::Object Answer;
SecurityObjects::SubMfaConfig MFC;
@@ -20,8 +20,10 @@ namespace OpenWifi {
if(User.userTypeProprietaryInfo.mfa.enabled) {
if(User.userTypeProprietaryInfo.mfa.method == "sms") {
MFC.sms = User.userTypeProprietaryInfo.mobiles[0].number;
MFC.type = "sms";
} else if(User.userTypeProprietaryInfo.mfa.method == "email") {
MFC.email = User.email;
MFC.type = "email";
}
} else {
MFC.type = "disabled";