mirror of
				https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
				synced 2025-10-30 18:27:49 +00:00 
			
		
		
		
	Fixing: https://telecominfraproject.atlassian.net/browse/WIFI-7828 for subscribers.
This commit is contained in:
		| @@ -32,23 +32,14 @@ namespace OpenWifi { | ||||
|     } | ||||
|  | ||||
|     void RESTAPI_suboauth2_handler::DoDelete() { | ||||
|         bool Expired = false, Contacted = false; | ||||
|         if (!IsAuthorized(Expired, Contacted, true)) { | ||||
|             if(Expired) | ||||
|                 return UnAuthorized(RESTAPI::Errors::EXPIRED_TOKEN); | ||||
|             return UnAuthorized(RESTAPI::Errors::INVALID_TOKEN); | ||||
|         auto Token = GetBinding(RESTAPI::Protocol::TOKEN, ""); | ||||
|         if(Token.empty() || (Token != SessionToken_)) { | ||||
|             return BadRequest(RESTAPI::Errors::MissingOrInvalidParameters); | ||||
|         } | ||||
|  | ||||
|         auto Token = GetBinding(RESTAPI::Protocol::TOKEN, "..."); | ||||
|         if (Token == SessionToken_) { | ||||
|         AuthService()->SubLogout(Token); | ||||
|         return ReturnStatus(Poco::Net::HTTPResponse::HTTP_NO_CONTENT, true); | ||||
|     } | ||||
|  | ||||
|         Logger_.information(fmt::format("BAD-LOGOUT({}): Request for {}", Request->clientAddress().toString(), UserInfo_.userinfo.email)); | ||||
|         NotFound(); | ||||
|     } | ||||
|  | ||||
|     void RESTAPI_suboauth2_handler::DoPost() { | ||||
|         const auto & Obj = ParsedBody_; | ||||
|         auto userId = GetS(RESTAPI::Protocol::USERID, Obj); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 stephb9959
					stephb9959