Skip to content

Commit 5a59586

Browse files
Rodion LiuboretsLuborRod
authored andcommitted
SDK-1829:Add support for Third Party Identity checks
1 parent 119d1cc commit 5a59586

File tree

7 files changed

+57
-71
lines changed

7 files changed

+57
-71
lines changed

.travis.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.

examples/doc-scan/app/Http/Controllers/HomeController.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Yoti\DocScan\Session\Create\Check\RequestedFaceMatchCheckBuilder;
1010
use Yoti\DocScan\Session\Create\Check\RequestedIdDocumentComparisonCheckBuilder;
1111
use Yoti\DocScan\Session\Create\Check\RequestedLivenessCheckBuilder;
12+
use Yoti\DocScan\Session\Create\Check\RequestedThirdPartyIdentityCheckBuilder;
1213
use Yoti\DocScan\Session\Create\Filters\Orthogonal\OrthogonalRestrictionsFilterBuilder;
1314
use Yoti\DocScan\Session\Create\Filters\RequiredIdDocumentBuilder;
1415
use Yoti\DocScan\Session\Create\Filters\RequiredSupplementaryDocumentBuilder;
@@ -44,6 +45,10 @@ public function show(Request $request, DocScanClient $client)
4445
(new RequestedIdDocumentComparisonCheckBuilder())
4546
->build()
4647
)
48+
->withRequestedCheck(
49+
(new RequestedThirdPartyIdentityCheckBuilder())
50+
->build()
51+
)
4752
->withRequestedTask(
4853
(new RequestedTextExtractionTaskBuilder())
4954
->withManualCheckAlways()

src/DocScan/Constants.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ class Constants
99
public const ID_DOCUMENT_TEXT_DATA_CHECK = 'ID_DOCUMENT_TEXT_DATA_CHECK';
1010
public const SUPPLEMENTARY_DOCUMENT_TEXT_DATA_CHECK = 'SUPPLEMENTARY_DOCUMENT_TEXT_DATA_CHECK';
1111
public const ID_DOCUMENT_FACE_MATCH = 'ID_DOCUMENT_FACE_MATCH';
12+
public const THIRD_PARTY_IDENTITY = 'THIRD_PARTY_IDENTITY';
1213
public const LIVENESS = 'LIVENESS';
1314

1415
public const ID_DOCUMENT_TEXT_DATA_EXTRACTION = 'ID_DOCUMENT_TEXT_DATA_EXTRACTION';
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Yoti\DocScan\Session\Create\Check;
6+
7+
use Yoti\DocScan\Constants;
8+
9+
class RequestedThirdPartyIdentityCheck extends RequestedCheck
10+
{
11+
/**
12+
* @return string
13+
*/
14+
protected function getType(): string
15+
{
16+
return Constants::THIRD_PARTY_IDENTITY;
17+
}
18+
19+
/**
20+
* @return RequestedCheckConfigInterface|null
21+
*/
22+
protected function getConfig(): ?RequestedCheckConfigInterface
23+
{
24+
return null;
25+
}
26+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Yoti\DocScan\Session\Create\Check;
6+
7+
class RequestedThirdPartyIdentityCheckBuilder
8+
{
9+
public function build(): RequestedThirdPartyIdentityCheck
10+
{
11+
return new RequestedThirdPartyIdentityCheck();
12+
}
13+
}

src/DocScan/Session/Retrieve/GetSessionResult.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ private function createCheckFromArray(array $check): CheckResponse
218218
return new SupplementaryDocTextDataCheckResponse($check);
219219
case Constants::LIVENESS:
220220
return new LivenessCheckResponse($check);
221+
case Constants::THIRD_PARTY_IDENTITY:
222+
return new ThirdPartyIdentityCheckResponse($check);
221223
default:
222224
return new CheckResponse($check);
223225
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Yoti\DocScan\Session\Retrieve;
6+
7+
class ThirdPartyIdentityCheckResponse extends CheckResponse
8+
{
9+
10+
}

0 commit comments

Comments
 (0)