Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AUSF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-AUSF
Commits
a4ffe97d
Commit
a4ffe97d
authored
May 25, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup
parent
4ec32d29
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
110 deletions
+57
-110
src/api_server/impl/DefaultApiImpl.cpp
src/api_server/impl/DefaultApiImpl.cpp
+9
-9
src/ausf_app/ausf_app.cpp
src/ausf_app/ausf_app.cpp
+45
-99
src/ausf_app/ausf_app.hpp
src/ausf_app/ausf_app.hpp
+3
-2
No files found.
src/api_server/impl/DefaultApiImpl.cpp
View file @
a4ffe97d
...
...
@@ -89,11 +89,11 @@ void DefaultApiImpl::rg_authentications_post(
void
DefaultApiImpl
::
ue_authentications_auth_ctx_id5g_aka_confirmation_put
(
const
std
::
string
&
authCtxId
,
const
ConfirmationData
&
confirmationData
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
uint16_t
http_response_code
=
0
;
nlohmann
::
json
json_data
=
{};
Pistache
::
Http
::
Code
code
=
{}
;
nlohmann
::
json
json_data
=
{};
m_ausf_app
->
handle_ue_authentications_confirmation
(
authCtxId
,
confirmationData
,
json_data
,
http_response_
code
);
authCtxId
,
confirmationData
,
json_data
,
code
);
// ausf --> seaf
Logger
::
ausf_server
().
debug
(
...
...
@@ -101,7 +101,7 @@ void DefaultApiImpl::ue_authentications_auth_ctx_id5g_aka_confirmation_put(
Logger
::
ausf_server
().
info
(
"Send 5g-aka-confirmation response to SEAF (Code 200)"
);
response
.
send
(
Pistache
::
Http
::
Code
(
http_response_code
)
,
json_data
.
dump
());
response
.
send
(
code
,
json_data
.
dump
());
}
void
DefaultApiImpl
::
ue_authentications_deregister_post
(
...
...
@@ -121,21 +121,21 @@ void DefaultApiImpl::ue_authentications_post(
// Getting params
std
::
string
reponse_from_udm
;
std
::
string
location
;
uint16_t
http_response_code
=
0
;
//
uint16_t http_response_code = 0;
UEAuthenticationCtx
ue_auth_ctx
=
{};
nlohmann
::
json
UEAuthCtx_json
=
{};
Pistache
::
Http
::
Code
code
=
{};
m_ausf_app
->
handle_ue_authentications
(
authenticationInfo
,
UEAuthCtx_json
,
location
,
http_response_
code
);
authenticationInfo
,
UEAuthCtx_json
,
location
,
code
);
Logger
::
ausf_server
().
debug
(
"Auth response:
\n
%s"
,
UEAuthCtx_json
.
dump
().
c_str
());
Logger
::
ausf_server
().
info
(
"Send Auth response to SEAF (Code 201)"
);
response
.
headers
().
add
<
Pistache
::
Http
::
Header
::
Location
>
(
location
);
response
.
send
(
Pistache
::
Http
::
Code
(
http_response_code
),
// Created
UEAuthCtx_json
.
dump
());
// Type: json object to string
response
.
send
(
code
,
UEAuthCtx_json
.
dump
());
// Type: json object to string
}
}
// namespace api
...
...
src/ausf_app/ausf_app.cpp
View file @
a4ffe97d
This diff is collapsed.
Click to expand it.
src/ausf_app/ausf_app.hpp
View file @
a4ffe97d
...
...
@@ -35,6 +35,7 @@
#include "UEAuthenticationCtx.h"
#include "ConfirmationData.h"
#include "ausf.h"
#include <pistache/http.h>
#include <map>
#include <shared_mutex>
...
...
@@ -75,11 +76,11 @@ class ausf_app {
void
handle_ue_authentications
(
const
AuthenticationInfo
&
authenticationInfo
,
nlohmann
::
json
&
json_data
,
std
::
string
&
location
,
uint16_t
&
http_response_
code
);
std
::
string
&
location
,
Pistache
::
Http
::
Code
&
code
);
void
handle_ue_authentications_confirmation
(
const
std
::
string
&
authCtxId
,
const
ConfirmationData
&
confirmation_data
,
nlohmann
::
json
&
json_data
,
uint16_t
&
http_response_
code
);
nlohmann
::
json
&
json_data
,
Pistache
::
Http
::
Code
&
code
);
bool
is_supi_2_security_context
(
const
std
::
string
&
supi
)
const
;
std
::
shared_ptr
<
security_context
>
supi_2_security_context
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment