mirror of
				https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
				synced 2025-10-31 18:57:51 +00:00 
			
		
		
		
	Framework update.
This commit is contained in:
		| @@ -63,8 +63,6 @@ namespace OpenWifi { | ||||
|         auto refreshToken = GetS("refresh_token", Obj); | ||||
|         auto grant_type = GetParameter("grant_type"); | ||||
|  | ||||
|         std::cout << __LINE__ << std::endl; | ||||
|  | ||||
|         Poco::toLowerInPlace(userId); | ||||
|  | ||||
|         if(!refreshToken.empty() && grant_type == "refresh_token") { | ||||
| @@ -78,7 +76,6 @@ namespace OpenWifi { | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         std::cout << __LINE__ << std::endl; | ||||
|         if(GetBoolParameter(RESTAPI::Protocol::REQUIREMENTS, false)) { | ||||
|             Logger_.information(fmt::format("POLICY-REQUEST({}): Request.", Request->clientAddress().toString())); | ||||
|             Poco::JSON::Object  Answer; | ||||
| @@ -87,7 +84,6 @@ namespace OpenWifi { | ||||
|             Answer.set(RESTAPI::Protocol::PASSWORDPOLICY, AuthService()->GetPasswordPolicy()); | ||||
|             return ReturnObject(Answer); | ||||
|         } | ||||
|         std::cout << __LINE__ << std::endl; | ||||
|  | ||||
|         if(GetBoolParameter(RESTAPI::Protocol::FORGOTPASSWORD,false)) { | ||||
|             SecurityObjects::UserInfo UInfo1; | ||||
| @@ -117,7 +113,6 @@ namespace OpenWifi { | ||||
|                 return ReturnObject(ReturnObj); | ||||
|             } | ||||
|         } | ||||
|         std::cout << __LINE__ << std::endl; | ||||
|  | ||||
|         if(GetBoolParameter(RESTAPI::Protocol::RESENDMFACODE,false)) { | ||||
|             Logger_.information(fmt::format("RESEND-MFA-CODE({}): Request for {}", Request->clientAddress().toString(), userId)); | ||||
| @@ -128,7 +123,6 @@ namespace OpenWifi { | ||||
|             } | ||||
|             return UnAuthorized(RESTAPI::Errors::InvalidCredentials, BAD_MFA_TRANSACTION); | ||||
|         } | ||||
|         std::cout << __LINE__ << std::endl; | ||||
|  | ||||
|         if(GetBoolParameter(RESTAPI::Protocol::COMPLETEMFACHALLENGE,false)) { | ||||
|             Logger_.information(fmt::format("COMPLETE-MFA-CHALLENGE({}): Request for {}", Request->clientAddress().toString(), userId)); | ||||
| @@ -142,13 +136,11 @@ namespace OpenWifi { | ||||
|             } | ||||
|             return UnAuthorized(RESTAPI::Errors::InvalidCredentials, MFA_FAILURE); | ||||
|         } | ||||
|         std::cout << __LINE__ << std::endl; | ||||
|  | ||||
|         SecurityObjects::UserInfoAndPolicy UInfo; | ||||
|         bool Expired=false; | ||||
|         auto Code=AuthService()->Authorize(userId, password, newPassword, UInfo, Expired); | ||||
|         if (Code==SUCCESS) { | ||||
|             std::cout << __LINE__ << std::endl; | ||||
|             Poco::JSON::Object ReturnObj; | ||||
|             if(AuthService()->RequiresMFA(UInfo)) { | ||||
|                 if(MFAServer()->StartMFAChallenge(UInfo, ReturnObj)) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 stephb9959
					stephb9959