mirror of
				https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
				synced 2025-10-31 10:47:48 +00:00 
			
		
		
		
	Fix for subscriber authentication tokens.
This commit is contained in:
		| @@ -110,24 +110,16 @@ namespace OpenWifi { | ||||
|             return UnAuthorized(RESTAPI::Errors::InvalidCredentials); | ||||
|         } | ||||
|  | ||||
|         _OWDEBUG_ | ||||
|         if(GetBoolParameter(RESTAPI::Protocol::COMPLETEMFACHALLENGE,false)) { | ||||
|             _OWDEBUG_ | ||||
|             Logger_.information(Poco::format("COMPLETE-MFA-CHALLENGE(%s): Request for %s", Request->clientAddress().toString(), userId)); | ||||
|             _OWDEBUG_ | ||||
|             if(Obj->has("uuid") && Obj->has("answer")) { | ||||
|                 _OWDEBUG_ | ||||
|                 std::cout << "UUID:" << Obj->get("uuid").toString() << "  answer:" << Obj->get("answer").toString() << std::endl; | ||||
|                 SecurityObjects::UserInfoAndPolicy UInfo; | ||||
|                 _OWDEBUG_ | ||||
|                 if(MFAServer().CompleteMFAChallenge(Obj,UInfo)) { | ||||
|                     Poco::JSON::Object ReturnObj; | ||||
|                     UInfo.webtoken.to_json(ReturnObj); | ||||
|                     return ReturnObject(ReturnObj); | ||||
|                 } | ||||
|                 _OWDEBUG_ | ||||
|             } | ||||
|             _OWDEBUG_ | ||||
|             return UnAuthorized(RESTAPI::Errors::InvalidCredentials); | ||||
|         } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 stephb9959
					stephb9959