Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-UDR
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-UDR
Commits
2cc79369
Commit
2cc79369
authored
Jan 29, 2021
by
yangjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update AuthenticationStatus
parent
5ba269dd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
36 deletions
+37
-36
etc/udr
etc/udr
+0
-0
src/impl/AuthenticationStatusDocumentApiImpl.cpp
src/impl/AuthenticationStatusDocumentApiImpl.cpp
+17
-17
src/model/AuthEvent.cpp
src/model/AuthEvent.cpp
+7
-6
src/model/AuthEvent.h
src/model/AuthEvent.h
+13
-13
No files found.
etc/udr
deleted
100755 → 0
View file @
5ba269dd
File deleted
src/impl/AuthenticationStatusDocumentApiImpl.cpp
View file @
2cc79369
...
@@ -36,14 +36,14 @@ void AuthenticationStatusDocumentApiImpl::create_authentication_status(const std
...
@@ -36,14 +36,14 @@ void AuthenticationStatusDocumentApiImpl::create_authentication_status(const std
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
select_AuthenticationStatus
.
c_str
(),
(
unsigned
long
)
select_AuthenticationStatus
.
size
()))
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
select_AuthenticationStatus
.
c_str
(),
(
unsigned
long
)
select_AuthenticationStatus
.
size
()))
{
{
Logger
::
udr_server
().
error
(
"mysql_real_query failure!SQL(%s)"
,
select_AuthenticationStatus
);
Logger
::
udr_server
().
error
(
"mysql_real_query failure!SQL(%s)"
,
select_AuthenticationStatus
.
c_str
()
);
return
;
return
;
}
}
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
if
(
res
==
NULL
)
if
(
res
==
NULL
)
{
{
Logger
::
udr_server
().
error
(
"mysql_store_result failure!SQL(%s)"
,
select_AuthenticationStatus
);
Logger
::
udr_server
().
error
(
"mysql_store_result failure!SQL(%s)"
,
select_AuthenticationStatus
.
c_str
()
);
return
;
return
;
}
}
if
(
mysql_num_rows
(
res
))
if
(
mysql_num_rows
(
res
))
...
@@ -51,10 +51,11 @@ void AuthenticationStatusDocumentApiImpl::create_authentication_status(const std
...
@@ -51,10 +51,11 @@ void AuthenticationStatusDocumentApiImpl::create_authentication_status(const std
query
=
"update AuthenticationStatus set nfInstanceId='"
+
authEvent
.
getNfInstanceId
()
+
"'"
+
\
query
=
"update AuthenticationStatus set nfInstanceId='"
+
authEvent
.
getNfInstanceId
()
+
"'"
+
\
",success="
+
(
authEvent
.
isSuccess
()
?
"1"
:
"0"
)
+
\
",success="
+
(
authEvent
.
isSuccess
()
?
"1"
:
"0"
)
+
\
",timeStamp='"
+
authEvent
.
getTimeStamp
()
+
"'"
+
\
",timeStamp='"
+
authEvent
.
getTimeStamp
()
+
"'"
+
\
",authType='"
+
authEvent
.
getAuthType
()
+
"'"
+
\
",servingNetworkName='"
+
authEvent
.
getServingNetworkName
()
+
"'"
+
\
",servingNetworkName='"
+
authEvent
.
getServingNetworkName
()
+
"'"
+
\
(
authEvent
.
authRemovalIndIsSet
()
?
(
authEvent
.
isAuthRemovalInd
()
?
",authRemovalInd=1"
:
",authRemovalInd=0"
)
:
""
);
(
authEvent
.
authRemovalIndIsSet
()
?
(
authEvent
.
isAuthRemovalInd
()
?
",authRemovalInd=1"
:
",authRemovalInd=0"
)
:
""
);
to_json
(
j
,
authEvent
.
getAuthType
());
//
to_json(j,authEvent.getAuthType());
query
+=
",authType='"
+
j
.
dump
()
+
"'"
;
//
query += ",authType='"+j.dump()+"'";
query
+=
" where ueid='"
+
ueId
+
"'"
;
query
+=
" where ueid='"
+
ueId
+
"'"
;
}
}
else
else
...
@@ -63,24 +64,24 @@ void AuthenticationStatusDocumentApiImpl::create_authentication_status(const std
...
@@ -63,24 +64,24 @@ void AuthenticationStatusDocumentApiImpl::create_authentication_status(const std
",nfInstanceId='"
+
authEvent
.
getNfInstanceId
()
+
"'"
+
\
",nfInstanceId='"
+
authEvent
.
getNfInstanceId
()
+
"'"
+
\
",success="
+
(
authEvent
.
isSuccess
()
?
"1"
:
"0"
)
+
\
",success="
+
(
authEvent
.
isSuccess
()
?
"1"
:
"0"
)
+
\
",timeStamp='"
+
authEvent
.
getTimeStamp
()
+
"'"
+
\
",timeStamp='"
+
authEvent
.
getTimeStamp
()
+
"'"
+
\
",authType='"
+
authEvent
.
getAuthType
()
+
"'"
+
\
",servingNetworkName='"
+
authEvent
.
getServingNetworkName
()
+
"'"
+
\
",servingNetworkName='"
+
authEvent
.
getServingNetworkName
()
+
"'"
+
\
(
authEvent
.
authRemovalIndIsSet
()
?
(
authEvent
.
isAuthRemovalInd
()
?
",authRemovalInd=1"
:
",authRemovalInd=0"
)
:
""
);
(
authEvent
.
authRemovalIndIsSet
()
?
(
authEvent
.
isAuthRemovalInd
()
?
",authRemovalInd=1"
:
",authRemovalInd=0"
)
:
""
);
to_json
(
j
,
authEvent
.
getAuthType
());
//
to_json(j,authEvent.getAuthType());
query
+=
",authType='"
+
j
.
dump
()
+
"'"
;
//
query += ",authType='"+j.dump()+"'";
}
}
mysql_free_result
(
res
);
mysql_free_result
(
res
);
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
{
{
Logger
::
udr_server
().
error
(
"mysql create failure!
"
);
Logger
::
udr_server
().
error
(
"mysql create failure!
SQL(%s)"
,
query
.
c_str
()
);
return
;
return
;
}
}
response
.
send
(
Pistache
::
Http
::
Code
::
No_Content
,
""
);
response
.
send
(
Pistache
::
Http
::
Code
::
No_Content
,
""
);
to_json
(
j
,
authEvent
);
to_json
(
j
,
authEvent
);
std
::
string
out
=
j
.
dump
();
Logger
::
udr_server
().
debug
(
"AuthenticationStatus PUT - json:
\n\"
%s
\"
"
,
j
.
dump
().
c_str
());
Logger
::
udr_server
().
debug
(
"AuthenticationStatus PUT - json:
\n\"
%s
\"
"
,
out
);
}
}
...
@@ -90,7 +91,7 @@ void AuthenticationStatusDocumentApiImpl::delete_authentication_status(const std
...
@@ -90,7 +91,7 @@ void AuthenticationStatusDocumentApiImpl::delete_authentication_status(const std
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
{
{
Logger
::
udr_server
().
error
(
"mysql_real_query failure!SQL(%s)"
,
query
);
Logger
::
udr_server
().
error
(
"mysql_real_query failure!SQL(%s)"
,
query
.
c_str
()
);
return
;
return
;
}
}
...
@@ -110,7 +111,7 @@ void AuthenticationStatusDocumentApiImpl::query_authentication_status(const std:
...
@@ -110,7 +111,7 @@ void AuthenticationStatusDocumentApiImpl::query_authentication_status(const std:
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
{
{
Logger
::
udr_server
().
error
(
"mysql_real_query failure!
"
);
Logger
::
udr_server
().
error
(
"mysql_real_query failure!
SQL(%s)"
,
query
.
c_str
()
);
return
;
return
;
}
}
...
@@ -143,9 +144,9 @@ void AuthenticationStatusDocumentApiImpl::query_authentication_status(const std:
...
@@ -143,9 +144,9 @@ void AuthenticationStatusDocumentApiImpl::query_authentication_status(const std:
}
}
else
if
(
!
strcmp
(
"authType"
,
field
->
name
))
else
if
(
!
strcmp
(
"authType"
,
field
->
name
))
{
{
AuthType
authtype
;
//
AuthType authtype;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
authtype
);
//
nlohmann::json::parse(row[i]).get_to(authtype);
authenticationstatus
.
setAuthType
(
authtype
);
authenticationstatus
.
setAuthType
(
row
[
i
]
);
}
}
else
if
(
!
strcmp
(
"servingNetworkName"
,
field
->
name
))
else
if
(
!
strcmp
(
"servingNetworkName"
,
field
->
name
))
{
{
...
@@ -163,12 +164,11 @@ void AuthenticationStatusDocumentApiImpl::query_authentication_status(const std:
...
@@ -163,12 +164,11 @@ void AuthenticationStatusDocumentApiImpl::query_authentication_status(const std:
to_json
(
j
,
authenticationstatus
);
to_json
(
j
,
authenticationstatus
);
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
j
.
dump
());
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
j
.
dump
());
std
::
string
out
=
j
.
dump
();
Logger
::
udr_server
().
debug
(
"AuthenticationStatus GET - json:
\n\"
%s
\"
"
,
j
.
dump
().
c_str
());
Logger
::
udr_server
().
debug
(
"AuthenticationStatus GET - json:
\n\"
%s
\"
"
,
out
.
c_str
());
}
}
else
else
{
{
Logger
::
udr_server
().
error
(
"AuthenticationStatus no data!
"
);
Logger
::
udr_server
().
error
(
"AuthenticationStatus no data!
SQL(%s)"
,
query
.
c_str
()
);
}
}
mysql_free_result
(
res
);
mysql_free_result
(
res
);
...
...
src/model/AuthEvent.cpp
View file @
2cc79369
/**
/**
* Nudr_DataRepository API OpenAPI file
* Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
*
* The version of the OpenAPI document: 2.1.2
* The version of the OpenAPI document: 2.1.2
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* https://openapi-generator.tech
...
@@ -23,10 +23,11 @@ AuthEvent::AuthEvent()
...
@@ -23,10 +23,11 @@ AuthEvent::AuthEvent()
m_NfInstanceId
=
""
;
m_NfInstanceId
=
""
;
m_Success
=
false
;
m_Success
=
false
;
m_TimeStamp
=
""
;
m_TimeStamp
=
""
;
m_AuthType
=
""
;
m_ServingNetworkName
=
""
;
m_ServingNetworkName
=
""
;
m_AuthRemovalInd
=
false
;
m_AuthRemovalInd
=
false
;
m_AuthRemovalIndIsSet
=
false
;
m_AuthRemovalIndIsSet
=
false
;
}
}
AuthEvent
::~
AuthEvent
()
AuthEvent
::~
AuthEvent
()
...
@@ -61,7 +62,7 @@ void from_json(const nlohmann::json& j, AuthEvent& o)
...
@@ -61,7 +62,7 @@ void from_json(const nlohmann::json& j, AuthEvent& o)
{
{
j
.
at
(
"authRemovalInd"
).
get_to
(
o
.
m_AuthRemovalInd
);
j
.
at
(
"authRemovalInd"
).
get_to
(
o
.
m_AuthRemovalInd
);
o
.
m_AuthRemovalIndIsSet
=
true
;
o
.
m_AuthRemovalIndIsSet
=
true
;
}
}
}
}
std
::
string
AuthEvent
::
getNfInstanceId
()
const
std
::
string
AuthEvent
::
getNfInstanceId
()
const
...
@@ -88,11 +89,11 @@ void AuthEvent::setTimeStamp(std::string const& value)
...
@@ -88,11 +89,11 @@ void AuthEvent::setTimeStamp(std::string const& value)
{
{
m_TimeStamp
=
value
;
m_TimeStamp
=
value
;
}
}
AuthType
AuthEvent
::
getAuthType
()
const
std
::
string
AuthEvent
::
getAuthType
()
const
{
{
return
m_AuthType
;
return
m_AuthType
;
}
}
void
AuthEvent
::
setAuthType
(
AuthType
const
&
value
)
void
AuthEvent
::
setAuthType
(
std
::
string
const
&
value
)
{
{
m_AuthType
=
value
;
m_AuthType
=
value
;
}
}
...
...
src/model/AuthEvent.h
View file @
2cc79369
/**
/**
* Nudr_DataRepository API OpenAPI file
* Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
*
* The version of the OpenAPI document: 2.1.2
* The version of the OpenAPI document: 2.1.2
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* https://openapi-generator.tech
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
/*
/*
* AuthEvent.h
* AuthEvent.h
*
*
*
*
*/
*/
#ifndef AuthEvent_H_
#ifndef AuthEvent_H_
...
@@ -29,7 +29,7 @@ namespace server {
...
@@ -29,7 +29,7 @@ namespace server {
namespace
model
{
namespace
model
{
/// <summary>
/// <summary>
///
///
/// </summary>
/// </summary>
class
AuthEvent
class
AuthEvent
{
{
...
@@ -43,32 +43,32 @@ public:
...
@@ -43,32 +43,32 @@ public:
/// AuthEvent members
/// AuthEvent members
/// <summary>
/// <summary>
///
///
/// </summary>
/// </summary>
std
::
string
getNfInstanceId
()
const
;
std
::
string
getNfInstanceId
()
const
;
void
setNfInstanceId
(
std
::
string
const
&
value
);
void
setNfInstanceId
(
std
::
string
const
&
value
);
/// <summary>
/// <summary>
///
///
/// </summary>
/// </summary>
bool
isSuccess
()
const
;
bool
isSuccess
()
const
;
void
setSuccess
(
bool
const
value
);
void
setSuccess
(
bool
const
value
);
/// <summary>
/// <summary>
///
///
/// </summary>
/// </summary>
std
::
string
getTimeStamp
()
const
;
std
::
string
getTimeStamp
()
const
;
void
setTimeStamp
(
std
::
string
const
&
value
);
void
setTimeStamp
(
std
::
string
const
&
value
);
/// <summary>
/// <summary>
///
///
/// </summary>
/// </summary>
AuthType
getAuthType
()
const
;
std
::
string
getAuthType
()
const
;
void
setAuthType
(
AuthType
const
&
value
);
void
setAuthType
(
std
::
string
const
&
value
);
/// <summary>
/// <summary>
///
///
/// </summary>
/// </summary>
std
::
string
getServingNetworkName
()
const
;
std
::
string
getServingNetworkName
()
const
;
void
setServingNetworkName
(
std
::
string
const
&
value
);
void
setServingNetworkName
(
std
::
string
const
&
value
);
/// <summary>
/// <summary>
///
///
/// </summary>
/// </summary>
bool
isAuthRemovalInd
()
const
;
bool
isAuthRemovalInd
()
const
;
void
setAuthRemovalInd
(
bool
const
value
);
void
setAuthRemovalInd
(
bool
const
value
);
...
@@ -84,7 +84,7 @@ protected:
...
@@ -84,7 +84,7 @@ protected:
std
::
string
m_TimeStamp
;
std
::
string
m_TimeStamp
;
AuthType
m_AuthType
;
std
::
string
m_AuthType
;
std
::
string
m_ServingNetworkName
;
std
::
string
m_ServingNetworkName
;
...
...
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