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
97bebada
Commit
97bebada
authored
Jan 23, 2021
by
HFJ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
err in 5gaka not fixed
parent
08458e54
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25518 additions
and
33 deletions
+25518
-33
CMakeLists.txt
CMakeLists.txt
+42
-14
api/AuthenticationResultDeletionApi.cpp
api/AuthenticationResultDeletionApi.cpp
+2
-3
api/DefaultApi.cpp
api/DefaultApi.cpp
+10
-5
main-api-server.cpp
main-api-server.cpp
+11
-5
model/UEAuthenticationCtx.cpp
model/UEAuthenticationCtx.cpp
+2
-2
model/UEAuthenticationCtx.h
model/UEAuthenticationCtx.h
+4
-4
model/nlohmann/json.hpp
model/nlohmann/json.hpp
+25447
-0
No files found.
CMakeLists.txt
View file @
97bebada
cmake_minimum_required
(
VERSION 3.2
)
project
(
a
pi
-server
)
project
(
a
usf
-server
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++14 -pg -g3"
)
include
(
ExternalProject
)
#
set(EXTERNAL_INSTALL_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/external)
set
(
EXTERNAL_INSTALL_LOCATION
${
CMAKE_CURRENT_SOURCE_DIR
}
/external
)
#ExternalProject_Add(PISTACHE
# GIT_REPOSITORY https://github.com/oktal/pistache.git
# CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LOCATION}
#)
ExternalProject_Add
(
PISTACHE
GIT_REPOSITORY https://github.com/oktal/pistache.git
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=
${
EXTERNAL_INSTALL_LOCATION
}
)
ExternalProject_Add
(
NLOHMANN
GIT_REPOSITORY https://github.com/nlohmann/json.git
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=
${
EXTERNAL_INSTALL_LOCATION
}
)
include_directories
(
${
EXTERNAL_INSTALL_LOCATION
}
/include
)
link_directories
(
${
EXTERNAL_INSTALL_LOCATION
}
/lib
)
include_directories
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/build/ext/spdlog/include
)
#ExternalProject_Add(NLOHMANN
# GIT_REPOSITORY https://github.com/nlohmann/json.git
# CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LOCATION}
### for common
include_directories
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/common
)
include_directories
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/common/unicode
)
file
(
GLOB COMMON_SRC
${
CMAKE_CURRENT_SOURCE_DIR
}
/common/conversions.cpp
)
### end for common
#)
#include_directories(${EXTERNAL_INSTALL_LOCATION}/include)
#link_directories(${EXTERNAL_INSTALL_LOCATION}/lib)
### for generated libcommon
include_directories
(
libcom
)
file
(
GLOB LIB_COMMON_SRC
${
CMAKE_CURRENT_SOURCE_DIR
}
/libcom/*.c
)
###end
### for authentication
include_directories
(
5gaka
)
include_directories
(
5gaka/test
)
include_directories
(
5gaka/algorithm_from_spec
)
file
(
GLOB 5GAKA_SRC
${
CMAKE_CURRENT_SOURCE_DIR
}
/5gaka/*.cpp
)
###end for
### for log
add_library
(
LOG STATIC
${
CMAKE_CURRENT_SOURCE_DIR
}
/common/logger.cpp
)
###end for log
include_directories
(
model
)
include_directories
(
api
)
...
...
@@ -32,6 +59,7 @@ file(GLOB SRCS
${
CMAKE_CURRENT_SOURCE_DIR
}
/*.cpp
)
add_executable
(
${
PROJECT_NAME
}
${
SRCS
}
)
#add_dependencies(${PROJECT_NAME} PISTACHE NLOHMANN)
add_executable
(
${
PROJECT_NAME
}
${
SRCS
}
${
5GAKA_SRC
}
${
LIB_COMMON_SRC
}
${
COMMON_SRC
}
)
add_dependencies
(
${
PROJECT_NAME
}
PISTACHE NLOHMANN
)
target_link_libraries
(
${
PROJECT_NAME
}
pistache pthread
)
api/AuthenticationResultDeletionApi.cpp
View file @
97bebada
...
...
@@ -81,11 +81,10 @@ void AuthenticationResultDeletionApi::delete_eap_authentication_result_handler(c
}
void
AuthenticationResultDeletionApi
::
authentication_result_deletion_api_default_handler
(
const
Pistache
::
Rest
::
Request
&
,
Pistache
::
Http
::
ResponseWriter
response
)
{
response
.
send
(
Pistache
::
Http
::
Code
::
Not_Found
,
"The requested method does not exist"
);
response
.
send
(
Pistache
::
Http
::
Code
::
Not_Found
,
"The requested method does not exist
-resDel
"
);
}
}
}
}
}
}
\ No newline at end of file
api/DefaultApi.cpp
View file @
97bebada
...
...
@@ -10,9 +10,12 @@
* Do not edit the class manually.
*/
#include <iostream>
#include "DefaultApi.h"
#include "Helpers.h"
using
namespace
std
;
namespace
org
{
namespace
openapitools
{
namespace
server
{
...
...
@@ -21,6 +24,7 @@ namespace api {
using
namespace
org
::
openapitools
::
server
::
helpers
;
using
namespace
org
::
openapitools
::
server
::
model
;
DefaultApi
::
DefaultApi
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
{
router
=
rtr
;
}
...
...
@@ -32,10 +36,10 @@ void DefaultApi::init() {
void
DefaultApi
::
setupRoutes
()
{
using
namespace
Pistache
::
Rest
;
Routes
::
Post
(
*
router
,
base
+
"/ue-authentications/:authCtxId/eap-session"
,
Routes
::
bind
(
&
DefaultApi
::
eap_auth_method_handler
,
this
));
Routes
::
Post
(
*
router
,
base
+
"/rg-authentications"
,
Routes
::
bind
(
&
DefaultApi
::
rg_authentications_post_handler
,
this
));
Routes
::
Put
(
*
router
,
base
+
"/ue-authentications/:authCtxId/5g-aka-confirmation"
,
Routes
::
bind
(
&
DefaultApi
::
ue_authentications_auth_ctx_id5g_aka_confirmation_put_handler
,
this
));
Routes
::
Post
(
*
router
,
base
+
"/ue-authentications/deregister"
,
Routes
::
bind
(
&
DefaultApi
::
ue_authentications_deregister_post_handler
,
this
));
//
Routes::Post(*router, base + "/ue-authentications/:authCtxId/eap-session", Routes::bind(&DefaultApi::eap_auth_method_handler, this));
//
Routes::Post(*router, base + "/rg-authentications", Routes::bind(&DefaultApi::rg_authentications_post_handler, this));
//
Routes::Put(*router, base + "/ue-authentications/:authCtxId/5g-aka-confirmation", Routes::bind(&DefaultApi::ue_authentications_auth_ctx_id5g_aka_confirmation_put_handler, this));
//
Routes::Post(*router, base + "/ue-authentications/deregister", Routes::bind(&DefaultApi::ue_authentications_deregister_post_handler, this));
Routes
::
Post
(
*
router
,
base
+
"/ue-authentications"
,
Routes
::
bind
(
&
DefaultApi
::
ue_authentications_post_handler
,
this
));
// Default handler, called when a route is not found
...
...
@@ -163,7 +167,8 @@ void DefaultApi::ue_authentications_post_handler(const Pistache::Rest::Request &
}
void
DefaultApi
::
default_api_default_handler
(
const
Pistache
::
Rest
::
Request
&
,
Pistache
::
Http
::
ResponseWriter
response
)
{
response
.
send
(
Pistache
::
Http
::
Code
::
Not_Found
,
"The requested method does not exist"
);
cout
<<
"in default api handler"
<<
endl
;
response
.
send
(
Pistache
::
Http
::
Code
::
Not_Found
,
"The requested method does not exist-default"
);
}
}
...
...
main-api-server.cpp
View file @
97bebada
...
...
@@ -23,6 +23,10 @@
#include "AuthenticationResultDeletionApiImpl.h"
#include "DefaultApiImpl.h"
// #include "authentication_algorithms_with_5gaka.hpp"
// #include "test.hpp"
#include "logger.hpp"
#define PISTACHE_SERVER_THREADS 2
#define PISTACHE_SERVER_MAX_REQUEST_SIZE 32768
#define PISTACHE_SERVER_MAX_RESPONSE_SIZE 32768
...
...
@@ -77,11 +81,13 @@ int main() {
opts
.
maxResponseSize
(
PISTACHE_SERVER_MAX_RESPONSE_SIZE
);
httpEndpoint
->
init
(
opts
);
AuthenticationResultDeletionApiImpl
AuthenticationResultDeletionApiserver
(
router
);
AuthenticationResultDeletionApiserver
.
init
();
DefaultApiImpl
DefaultApiserver
(
router
);
DefaultApiserver
.
init
();
Logger
::
ausf_server
().
debug
(
"test logger!"
);
// f1_test();
//AuthenticationResultDeletionApiImpl AuthenticationResultDeletionApiserver(router);
//AuthenticationResultDeletionApiserver.init();
// DefaultApiImpl DefaultApiserver(router);
// DefaultApiserver.init();
httpEndpoint
->
setHandler
(
router
->
handler
());
httpEndpoint
->
serve
();
...
...
model/UEAuthenticationCtx.cpp
View file @
97bebada
...
...
@@ -64,11 +64,11 @@ void UEAuthenticationCtx::setAuthType(AuthType const& value)
{
m_AuthType
=
value
;
}
OneOfAv5gAkastring
UEAuthenticationCtx
::
getR5gAuthData
()
const
Av5gAka
UEAuthenticationCtx
::
getR5gAuthData
()
const
{
return
m_r_5gAuthData
;
}
void
UEAuthenticationCtx
::
setR5gAuthData
(
OneOfAv5gAkastring
const
&
value
)
void
UEAuthenticationCtx
::
setR5gAuthData
(
Av5gAka
const
&
value
)
{
m_r_5gAuthData
=
value
;
}
...
...
model/UEAuthenticationCtx.h
View file @
97bebada
...
...
@@ -19,7 +19,7 @@
#define UEAuthenticationCtx_H_
#include "
OneOfAv5gAkastring
.h"
#include "
Av5gAka
.h"
#include "LinksValueSchema.h"
#include "AuthType.h"
#include <string>
...
...
@@ -54,8 +54,8 @@ public:
/// <summary>
///
/// </summary>
OneOfAv5gAkastring
getR5gAuthData
()
const
;
void
setR5gAuthData
(
OneOfAv5gAkastring
const
&
value
);
Av5gAka
getR5gAuthData
()
const
;
void
setR5gAuthData
(
Av5gAka
const
&
value
);
/// <summary>
///
/// </summary>
...
...
@@ -74,7 +74,7 @@ public:
protected:
AuthType
m_AuthType
;
OneOfAv5gAkastring
m_r_5gAuthData
;
Av5gAka
m_r_5gAuthData
;
std
::
map
<
std
::
string
,
LinksValueSchema
>
m__links
;
...
...
model/nlohmann/json.hpp
0 → 100644
View file @
97bebada
This diff is collapsed.
Click to expand it.
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