Commit 880feeb2 authored by kharade's avatar kharade

code cleaning

parent fe8e290e
......@@ -189,7 +189,7 @@ void DefaultApi::ue_authentications_deregister_post_handler(
}
}
void DefaultApi:: ue_authentications_post_handler(
void DefaultApi::ue_authentications_post_handler(
const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response) {
Logger::ausf_server().info("Received ue_authentications_post Request");
......
......@@ -232,7 +232,7 @@ void ausf_http2_server::ue_authentications_post_handler(
header_map h;
m_ausf_app->handle_ue_authentications(
authenticationInfo, UEAuthCtx_json, location, code);
authenticationInfo, UEAuthCtx_json, location, code, 2);
Logger::ausf_server().debug(
"Auth response:\n %s", UEAuthCtx_json.dump().c_str());
......
......@@ -118,7 +118,7 @@ void ausf_app::set_contextId_2_security_context(
//------------------------------------------------------------------------------
void ausf_app::handle_ue_authentications(
const AuthenticationInfo& authenticationInfo, nlohmann::json& json_data,
std::string& location, Pistache::Http::Code& code) {
std::string& location, Pistache::Http::Code& code, uint8_t http_version) {
Logger::ausf_app().info("Handle UE Authentication Request");
std::string snn =
authenticationInfo.getServingNetworkName(); // serving network name
......@@ -313,11 +313,14 @@ void ausf_app::handle_ue_authentications(
// Store the security context
set_contextId_2_security_context(authCtxId_s, sc);
std::string ausf_port = std::to_string(ausf_cfg.sbi.port);
if (http_version == 2) ausf_port = std::to_string(ausf_cfg.sbi_http2_port);
resourceURI =
"http://" +
std::string(inet_ntoa(*((struct in_addr*) &ausf_cfg.sbi.addr4))) + ":" +
std::to_string(ausf_cfg.sbi.port) + "/nausf-auth/v1/ue-authentications/" +
authCtxId_s + "/5g-aka-confirmation";
ausf_port + "/nausf-auth/v1/ue-authentications/" + authCtxId_s +
"/5g-aka-confirmation";
ausf_Href.setHref(resourceURI);
ausf_links["5G_AKA"] = ausf_Href;
......
......@@ -76,7 +76,8 @@ class ausf_app {
void handle_ue_authentications(
const AuthenticationInfo& authenticationInfo, nlohmann::json& json_data,
std::string& location, Pistache::Http::Code& code);
std::string& location, Pistache::Http::Code& code,
uint8_t http_version = 1);
void handle_ue_authentications_confirmation(
const std::string& authCtxId, const ConfirmationData& confirmation_data,
......
......@@ -251,11 +251,9 @@ void ausf_config::display() {
" API Version...........: %s", sbi_api_version.c_str());
Logger::config().info("- Supported Features:");
Logger::config().info(
" Use FQDN ..............: %s",
use_fqdn_dns ? "Yes" : "No");
" Use FQDN ..............: %s", use_fqdn_dns ? "Yes" : "No");
Logger::config().info(
" Use HTTP2..............: %s",
use_http2 ? "Yes" : "No");
" Use HTTP2..............: %s", use_http2 ? "Yes" : "No");
Logger::config().info("- UDM:");
Logger::config().info(
......
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