@velocitycareerlabs/yoti-integration-plugin 1.25.0-dev-build.1a0f93709 → 1.25.0-dev-build.1dc2525a2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +10 -10
- package/src/config/config.js +1 -0
- package/src/yoti.js +11 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velocitycareerlabs/yoti-integration-plugin",
|
|
3
|
-
"version": "1.25.0-dev-build.
|
|
3
|
+
"version": "1.25.0-dev-build.1dc2525a2",
|
|
4
4
|
"description": "Library supporting integration with Yoti services",
|
|
5
5
|
"repository": "https://github.com/velocitycareerlabs/packages",
|
|
6
6
|
"main": "index.js",
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@getyoti/sdk-sandbox": "1.7.0",
|
|
18
18
|
"@spencejs/spence-mongo-repos": "^0.10.2",
|
|
19
|
-
"@velocitycareerlabs/common-schemas": "1.25.0-dev-build.
|
|
20
|
-
"@velocitycareerlabs/config": "1.25.0-dev-build.
|
|
21
|
-
"@velocitycareerlabs/country-data": "1.25.0-dev-build.
|
|
22
|
-
"@velocitycareerlabs/crypto": "1.25.0-dev-build.
|
|
23
|
-
"@velocitycareerlabs/jwt": "1.25.0-dev-build.
|
|
24
|
-
"@velocitycareerlabs/request": "1.25.0-dev-build.
|
|
19
|
+
"@velocitycareerlabs/common-schemas": "1.25.0-dev-build.1dc2525a2",
|
|
20
|
+
"@velocitycareerlabs/config": "1.25.0-dev-build.1dc2525a2",
|
|
21
|
+
"@velocitycareerlabs/country-data": "1.25.0-dev-build.1dc2525a2",
|
|
22
|
+
"@velocitycareerlabs/crypto": "1.25.0-dev-build.1dc2525a2",
|
|
23
|
+
"@velocitycareerlabs/jwt": "1.25.0-dev-build.1dc2525a2",
|
|
24
|
+
"@velocitycareerlabs/request": "1.25.0-dev-build.1dc2525a2",
|
|
25
25
|
"env-var": "^7.0.0",
|
|
26
26
|
"http-errors": "2.0.0",
|
|
27
27
|
"lodash": "^4.17.21",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@spencejs/spence-factories": "0.10.2",
|
|
35
|
-
"@velocitycareerlabs/server-provider": "1.25.0-dev-build.
|
|
36
|
-
"@velocitycareerlabs/tests-helpers": "1.25.0-dev-build.
|
|
35
|
+
"@velocitycareerlabs/server-provider": "1.25.0-dev-build.1dc2525a2",
|
|
36
|
+
"@velocitycareerlabs/tests-helpers": "1.25.0-dev-build.1dc2525a2",
|
|
37
37
|
"eslint": "8.57.1",
|
|
38
38
|
"eslint-config-airbnb-base": "14.2.1",
|
|
39
39
|
"eslint-config-prettier": "8.10.0",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"nock": "13.5.6",
|
|
48
48
|
"prettier": "2.8.8"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "ab707d5fd7b5a1ed27e6c0e1725df5276e24720d"
|
|
51
51
|
}
|
package/src/config/config.js
CHANGED
|
@@ -14,6 +14,7 @@ const yotiConfig = {
|
|
|
14
14
|
yotiNotificationsWebhookRelativePath: '/yoti-integration/notifications',
|
|
15
15
|
yotiSessionTtl: 2629800, // seconds
|
|
16
16
|
yotiResourceRetentionTtl: 5259600, // 315576000 for creating long lived session for CI
|
|
17
|
+
yotiExcludedDocs: env.get('YOTI_EXCLUDED_DOCUMENTS').default('').asArray(),
|
|
17
18
|
};
|
|
18
19
|
|
|
19
20
|
module.exports = {
|
package/src/yoti.js
CHANGED
|
@@ -9,6 +9,8 @@ const {
|
|
|
9
9
|
RequestedTextExtractionTaskBuilder,
|
|
10
10
|
RequestedFaceMatchCheckBuilder,
|
|
11
11
|
SdkConfigBuilder,
|
|
12
|
+
OrthogonalRestrictionsFilterBuilder,
|
|
13
|
+
RequiredIdDocumentBuilder,
|
|
12
14
|
} = require('yoti');
|
|
13
15
|
|
|
14
16
|
const { IdCredentialTypes } = require('./id-credential-types');
|
|
@@ -246,6 +248,14 @@ const createSessionSpec = ({ verifierAuthToken, countryCode }, { config }) => {
|
|
|
246
248
|
.forSessionCompletion()
|
|
247
249
|
.build();
|
|
248
250
|
|
|
251
|
+
const passportFilter = new OrthogonalRestrictionsFilterBuilder()
|
|
252
|
+
.withBlacklistedDocumentTypes(config.yotiExcludedDocs)
|
|
253
|
+
.build();
|
|
254
|
+
|
|
255
|
+
const requiredDocument = new RequiredIdDocumentBuilder()
|
|
256
|
+
.withFilter(passportFilter)
|
|
257
|
+
.build();
|
|
258
|
+
|
|
249
259
|
return (
|
|
250
260
|
new SessionSpecificationBuilder()
|
|
251
261
|
.withClientSessionTokenTtl(config.yotiSessionTtl)
|
|
@@ -257,6 +267,7 @@ const createSessionSpec = ({ verifierAuthToken, countryCode }, { config }) => {
|
|
|
257
267
|
.withRequestedTask(textExtractionTask)
|
|
258
268
|
.withSdkConfig(sdkConfig)
|
|
259
269
|
.withNotifications(notificationConfig)
|
|
270
|
+
.withRequiredDocument(requiredDocument)
|
|
260
271
|
.build()
|
|
261
272
|
);
|
|
262
273
|
};
|