Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
DigiGov-OSS
getNncIdentityClient
Commits
8df1aa13
Commit
8df1aa13
authored
Feb 16, 2022
by
Panagiotis Skarvelis
Browse files
ause latest auditrecord db
parent
c8fd620d
Changes
3
Hide whitespace changes
Inline
Side-by-side
dist/cjs/index.js
View file @
8df1aa13
...
...
@@ -31,13 +31,13 @@ const getIdentity = (afm, user, pass, overides) => __awaiter(void 0, void 0, voi
const
auditStoragePath
=
(
_c
=
overides
===
null
||
overides
===
void
0
?
void
0
:
overides
.
auditStoragePath
)
!==
null
&&
_c
!==
void
0
?
_c
:
"
/tmp
"
;
const
auditEngine
=
(
_d
=
overides
===
null
||
overides
===
void
0
?
void
0
:
overides
.
auditEngine
)
!==
null
&&
_d
!==
void
0
?
_d
:
new
gsis_audit_record_db_1
.
FileEngine
(
auditStoragePath
);
const
wsdl
=
prod
==
true
?
config_json_1
.
default
.
prod
.
wsdl
:
config_json_1
.
default
.
test
.
wsdl
;
const
auditRecord
=
(
0
,
gsis_audit_record_db_1
.
generateAuditRecord
)(
auditInit
,
auditEngine
);
const
auditRecord
=
yield
(
0
,
gsis_audit_record_db_1
.
generateAuditRecord
)(
auditInit
,
auditEngine
);
if
(
!
auditRecord
)
throw
new
Error
(
'
Audit record is not initialized
'
);
try
{
const
s
=
new
soapClient_js_1
.
default
(
wsdl
,
user
,
pass
,
auditRecord
);
const
Identity
=
yield
s
.
getIdentity
(
afm
);
return
Identity
;
return
Object
.
assign
(
Object
.
assign
({},
Identity
),
auditRecord
)
;
}
catch
(
error
)
{
throw
(
error
);
...
...
dist/esm/index.js
View file @
8df1aa13
...
...
@@ -15,13 +15,13 @@ export const getIdentity = async (afm, user, pass, overides) => {
const
auditStoragePath
=
overides
?.
auditStoragePath
??
"
/tmp
"
;
const
auditEngine
=
overides
?.
auditEngine
??
new
FileEngine
(
auditStoragePath
);
const
wsdl
=
prod
==
true
?
config
.
prod
.
wsdl
:
config
.
test
.
wsdl
;
const
auditRecord
=
generateAuditRecord
(
auditInit
,
auditEngine
);
const
auditRecord
=
await
generateAuditRecord
(
auditInit
,
auditEngine
);
if
(
!
auditRecord
)
throw
new
Error
(
'
Audit record is not initialized
'
);
try
{
const
s
=
new
soapClient
(
wsdl
,
user
,
pass
,
auditRecord
);
const
Identity
=
await
s
.
getIdentity
(
afm
);
return
Identity
;
return
{
...
Identity
,
...
auditRecord
}
;
}
catch
(
error
)
{
throw
(
error
);
...
...
package.json
View file @
8df1aa13
{
"name"
:
"@digigov-oss/get-nnc-identity-client"
,
"version"
:
"1.
0.9
"
,
"version"
:
"1.
1.0
"
,
"type"
:
"module"
,
"description"
:
"Client for getNncIdentity service of GSIS"
,
"engines"
:
{
...
...
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