Registering and Verifying an Individual (via Document Validation and Facial Biometrics)

Overview

To use greenID Web to register and verify a new person, the following steps are required:

  1. Create an HTML element in which greenID Web will render UI controls.

  2. Include the greenID Web javascript library and perform the setup.  This is described in detail below.

  3. Include the greenID Web CSS file

  4. Call the ‘setup’ and ‘showBiometricCapture’ functions to start the capture.

These steps are discussed in detail below. 

Create an HTML element in which greenID Web will render UI controls

Once greenID Web has been invoked, there must be a specific element in the page where greenID Web can render its UI controls.  It is expected that this will simply be an empty HTML div element with an ID that is specified in the greenID Web javascript setup (discussed below).

Below is an example HTML fragment:

<div id="greenid-div"> </div>

Note that this div element is required in both the new and returning person scenarios.

Include and setup javascript

There are several javascript files that must be included.  Example HTML code for the basic inclusions is below:

Important: You must link directly to the files using the URLs below. Do not take a local copy.

In the Australian Production environment: 

<script src="https://simpleui-au.vixverify.com/df/javascripts/greenidConfig.js" type="text/javascript"></script> <script src="https://simpleui-au.vixverify.com/df/javascripts/greenidui.min.js" type="text/javascript"></script>

In the Australian Test environment:

<script src="https://simpleui-test-au.vixverify.com/df/javascripts/greenidConfig.js" type="text/javascript"></script> <script src="https://simpleui-test-au.vixverify.com/df/javascripts/greenidui.min.js" type="text/javascript"></script>

Important: Remember to set the "environment" parameter in the greenidUi.setup() function to "test" or "prod" to match these URLs (see "Javascript setup for registering a new person" below).

These files can be included at any point on the page.

All of this code is also available on the example form at https://test-au.vixverify.com/verification/customers/greenid_simpleui_demo/simpleui-demo.html 

Note that the inclusions are the same for the new and returning person scenarios.

Javascript Setup for Registering a New Person in Biometric mode

This section describes how to setup greenID Web to start in Biometrics mode

An example of the setup required is below:

This function is run when the document is ready, and calls the greenidUI.setup function.  The various parameters are explained below:

  • environment – controls whether greenID will call the greenID test or production system.  The value “test” is used to target the test environment, and the value “prod” is used to target the production environment.

  • frameId – the ID of the empty div element that greenID Web will use to render UI elements into.

  • registerCallback – a function that, if supplied, will be called when the registration is completed.

  • errorCallback – a function that, if supplied, will be invoked whenever an error is experienced.

  • sessionCompleteCallback – a function that, if supplied, will be invoked whenever the verification session is complete.  The session may complete with a successful verification, an incomplete or failed verification or the person may abandon the verification process.

  • sourceAttemptCallback – a function that, if supplied, will be invoked whenever the person attempts a source.

  • sessionCancelledCallback – a function that, if supplied, will be invoked whenever a person ends a session by clicking on the “save and complete later” button.

There are other optional parameters that are discussed in Setup Function Options.

All of the parameters, except the callback functions, are required.  If required parameters are not present, then an error will occur, and the verification session will not begin.

Refer to Callbacks for further details. 

Javascript - launching Biometric mode

Once the greenID setup function has been called, the biometric capture can be launched. This can be done in response to some action from the user, or automatically.

The following example code shows a function that, when called, will start the biometric capture:

Before launching the capture, the configuration can be overridden to change certain wording in the capture process. See the ‘setOverrides’ function if you want to change any of the wording.

The greenidUI.showBiometricCapture function will start the capture, and replace the contents of the div that was defined by the frameId in the greenidUI.setup code above. During and after the capture, the callbacks defined in greenidUI.setup will be called.

The greenidUI.showBiometricCapture has three arguments:

  • account name - provided by greenID team

  • api code (password) - provided by greenID team

  • rule ID - this can be set to ‘default’ to use the default rule that has been configured for your account, or set to use a different rule ID - speak to the greenID team if you want to use multiple rules.

Harmony Right Address (Loqate) Library

If using Harmony Right Address to capture the individual’s address, a jQuery library must be included on the start page. See sample below: