Implementation of Journeys Concept – GBG IDscan Documentation

Implementation of Journeys Concept

Describes what is the next step to perform by the server to continue the journey workflow.

1. Double Sided Scan

Start journey using `submitDocumentConstructingWithBlock` method

  • Add addDocument image – the extracted image
  • Add setJourneyID – journey ID will be generated automatically if it is empty.
  • Add setCredentials – username, password, urlPrefix and area(IDSEnterpriseAuthenticationArea)
  • Add setDocumentSource – Identity (IDSEnterpriseDocumentTypeIdentity)

When upload completed, check the response paramater requiredAction if its value NONE, then journey is completed. If requiredAction is SCANBACKSIDE, follow the same procedure by just attaching JourneyID of the initial request (you can also find the JourneyID in the IDSEnterpriseResponse object).

2. Triple Scan

Start journey using `submitDocumentConstructingWithBlock` method

  • Add addDocument image – the extracted image
  • Add setJourneyID – journey ID will be generated automatically if it is empty.
  • Add setCredentials – username, password, urlPrefix and area(IDSEnterpriseAuthenticationArea)
  • Add setDocumentSource – Identity (IDSEnterpriseDocumentTypeIdentity)

When upload completed, check the response paramater requiredAction if its value NONE then the journey is completed. If requiredAction is SECONDSCAN or THIRDSCAN you need to repeat the same requiredAction.

3. Face match

Once document upload is completed, check the response parameter requiredAction if its value is CAPTURESELFIE, native iOS camera or Document Scanner with selfie type should be used in order to capture selfie image.

Continue journey using `submitDocumentConstructingWithBlock` method

  • Add addSelfieImage – the selfie image
  • Add setJourneyID – journey ID from initial request.
  • Add setCredentials – username, password, urlPrefix and area(IDSEnterpriseAuthenticationArea)
  • Add setDocumentSource – Identity (IDSEnterpriseDocumentTypeIdentity)

The face match result is part of the response inside authenticationResultDetails and possible values are (*Referred from IEOS API Documentation):

  • Passed: A selfie was provided a portrait photo was located on the document and the face match result was true.
  • Failed: A selfie was provided a portrait photo was located on the document and the face match result was false.
  • Undetermined: A selfie was provided a portrait photo was located on the document and the face match result was null.
  • Required: Face match option was enabled and a selfie was not provided.
  • Skipped: Face match option was disabled and one of these conditions was met (a selfie was not provided or the document wasn’t a recognised ID document or a portrait photo was not located on the document).

4. Liveness

If liveness is enabled, the backend will return required action as LIVENESS.

You can then initialise IDSLivenessViewController with configuration. To parse the configuration from the backend you can use a IDSLivenessMapper bridge class, where you can pass IDSEnterpriseResponse and get IDSLivenessConfig.

Once liveness is running it will return a face match image in the receivedFaceImage: delegate method. Take that image and send it as a selfie image.

Example Usage:

[IDSEnterpriseService submitDocumentConstructingWithBlock:^(IDSEnterpriseSendRequest * _Nonnull request) { [request setCredentials:self.credentials];
[request setDocumentSource:IDSEnterpriseDocumentTypeIdentity];

// Check if selfie sending
if (self.scanningPhase == ScanningPhaseSelfie || self.scanningPhase == ScanningPhaseLiveness) { [request addSelfieImage:image];
} else {
[request addDocument:image]; }

// Set proper source if its address document
if (self.scanningPhase == ScanningPhaseAddressDocument) { [request setDocumentSource:IDSEnterpriseDocumentTypeUtility]; }

// Set journeyID if we following the journey if (self.lastDocumentScanResponse) {
[request setJourneyID:self.lastDocumentScanResponse.journeyID]; }
} progress:nil completion:^(IDSEnterpriseResponse * _Nullable response, NSError * _Nullable error) { if (error) {
[self handleError:error];
} else {
[self handleServerResponse:response];
}
}];

After liveness is complete, the delegate method didFinishLiveness:withResult: will be called. You should then take the result, map it to IDSEnterpriseRequestLiveness (using the bridge mapper).

Warning: Do not forget to set journeyID of the request to map the result to the ongoing journey.

Finally, submit the request using the following method:

[IDSEnterpriseService submitLivenessResult:request credentials:credentials progress:nil completion:^(IDSEnterpriseResponse * _Nullable response, NSError * _Nullable error){}];
Was this page helpful?