Commit 36cfa8c5 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Use variable in Ausf app to store av

parent 406b872a
...@@ -132,7 +132,7 @@ void DefaultApiImpl::ue_authentications_post( ...@@ -132,7 +132,7 @@ void DefaultApiImpl::ue_authentications_post(
authenticationInfo, UEAuthCtx_json, location, http_response_code); authenticationInfo, UEAuthCtx_json, location, http_response_code);
// nlohmann::json UEAuthCtx_json; // nlohmann::json UEAuthCtx_json;
to_json(UEAuthCtx_json, ue_auth_ctx); // to_json(UEAuthCtx_json, ue_auth_ctx);
Logger::ausf_server().debug( Logger::ausf_server().debug(
"auth response:\n %s", UEAuthCtx_json.dump().c_str()); "auth response:\n %s", UEAuthCtx_json.dump().c_str());
......
...@@ -64,26 +64,21 @@ extern ausf_app* ausf_app_inst; ...@@ -64,26 +64,21 @@ extern ausf_app* ausf_app_inst;
ausf_client* ausf_client_inst = nullptr; ausf_client* ausf_client_inst = nullptr;
using namespace config; using namespace config;
extern ausf_config ausf_cfg; extern ausf_config ausf_cfg;
/*
AUSF_AV_s ausf_av_s = {};
// stored temporarily
uint8_t XRES_STAR[16]; // store xres*
std::string SUPI_AUSF; // store supi
std::string AUTH_TYPE; // store authType
std::string SERVING_NN; // store serving network name
std::string KAUSF_TMP; // store Kausf(string)
*/
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
ausf_app::ausf_app(const std::string& config_file) { ausf_app::ausf_app(const std::string& config_file) {
Logger::ausf_app().startup("Starting..."); Logger::ausf_app().startup("Starting...");
ausf_av_s = {};
uint8_t XRES_STAR[16] = {};
Logger::ausf_app().startup("Started"); Logger::ausf_app().startup("Started");
} }
//------------------------------------------------------------------------------
ausf_app::~ausf_app() { ausf_app::~ausf_app() {
Logger::ausf_app().debug("Delete AUSF_APP instance..."); Logger::ausf_app().debug("Delete AUSF_APP instance...");
} }
//------------------------------------------------------------------------------
void ausf_app::handle_ue_authentications( void ausf_app::handle_ue_authentications(
const AuthenticationInfo& authenticationInfo, nlohmann::json& json_data, const AuthenticationInfo& authenticationInfo, nlohmann::json& json_data,
std::string& location, uint16_t& http_response_code) { std::string& location, uint16_t& http_response_code) {
...@@ -287,6 +282,7 @@ void ausf_app::handle_ue_authentications( ...@@ -287,6 +282,7 @@ void ausf_app::handle_ue_authentications(
Logger::ausf_server().debug("auth response:\n %s", json_data.dump().c_str()); Logger::ausf_server().debug("auth response:\n %s", json_data.dump().c_str());
} }
//------------------------------------------------------------------------------
void ausf_app::handle_ue_authentications_confirmation( void ausf_app::handle_ue_authentications_confirmation(
const std::string& authCtxId, const ConfirmationData& confirmationData, const std::string& authCtxId, const ConfirmationData& confirmationData,
nlohmann::json& json_data, uint16_t& http_response_code) { nlohmann::json& json_data, uint16_t& http_response_code) {
...@@ -416,4 +412,8 @@ void ausf_app::handle_ue_authentications_confirmation( ...@@ -416,4 +412,8 @@ void ausf_app::handle_ue_authentications_confirmation(
udmUri, Method, confirmResultInfo.dump(), Response); udmUri, Method, confirmResultInfo.dump(), Response);
} }
} }
// nlohmann::json confirmResponse_json;
to_json(json_data, confirmResponse);
http_response_code = 200; // TODO
} }
...@@ -64,6 +64,7 @@ ausf_client::~ausf_client() { ...@@ -64,6 +64,7 @@ ausf_client::~ausf_client() {
Logger::ausf_app().debug("Delete AUSF Client instance..."); Logger::ausf_app().debug("Delete AUSF Client instance...");
} }
//------------------------------------------------------------------------------
void ausf_client::curl_http_client( void ausf_client::curl_http_client(
std::string remoteUri, std::string Method, std::string msgBody, std::string remoteUri, std::string Method, std::string msgBody,
std::string& Response) { std::string& Response) {
......
...@@ -49,15 +49,7 @@ ...@@ -49,15 +49,7 @@
#include <boost/algorithm/string/classification.hpp> #include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp> #include <boost/algorithm/string/split.hpp>
extern "C" {
//#include <arpa/inet.h>
//#include <stdbool.h>
//#include <stdlib.h>
//#include <string.h>
//#include <sys/types.h>
//#include <unistd.h>
#include "common_defs.h" #include "common_defs.h"
}
using namespace libconfig; using namespace libconfig;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment