> ## Documentation Index
> Fetch the complete documentation index at: https://docs.go.gbgplc.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Biometrics Reverification

> Reverify a returning person in GBG GO by confirming a live, uninjected selfie and matching it against a previously captured anchor image.

The **Biometrics Reverification** module verifies the authenticity and liveness of a person's image. It then matches that image against a trusted source image. The module combines three checks into a single overall result:

* IAD (injection attack detection) capture liveness
* Face liveness
* Face match

Use this module for reverification scenarios. It confirms that the person presenting themselves is the same individual verified during an earlier onboarding or identity check.

The module requires a new encrypted selfie and a previously captured anchor image to compare against.

Required inputs include encrypted selfie and anchor image.

## Capabilities

The module returns four capabilities: an overall result and the individual result of each underlying check.

### Overall result

This capability returns the combined outcome of all reverification checks.

| Code     | Label  | Description                                                                                        |
| -------- | ------ | -------------------------------------------------------------------------------------------------- |
| `Passed` | Passed | All reverification checks passed. The selfie is live, not injected, and matches the anchor image.  |
| `Failed` | Failed | One or more reverification checks failed.                                                          |
| `Error`  | Error  | The overall result could not be determined due to a system-level issue. This is the default value. |

### IAD: Capture liveness

This capability indicates whether the captured image passes injection attack detection. It confirms the selfie was taken live rather than injected from a pre-recorded or synthetic source.

| Code       | Label    | Description                                                                                                                                   |
| ---------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `Live`     | Live     | The selfie was captured live through a legitimate device camera.                                                                              |
| `Not Live` | Not Live | An injection attack was detected. The selfie appears to have been injected from a pre-recorded or synthetic source rather than captured live. |
| `Error`    | Error    | The injection attack detection check could not be completed due to a technical issue. This is the default value.                              |

### Face liveness

This capability indicates whether the face in the selfie is a live person rather than a photo, mask, or deepfake.

| Code       | Label    | Description                                                                                                         |
| ---------- | -------- | ------------------------------------------------------------------------------------------------------------------- |
| `Live`     | Live     | The face is live. A real, physically present person was in front of the camera when the selfie was captured.        |
| `Not Live` | Not Live | The face is not live. The selfie may be a printed photograph, screen replay, video recording, 3D mask, or deepfake. |
| `Error`    | Error    | The face liveness check could not be completed due to a technical issue. This is the default value.                 |

### Face match

This capability indicates whether the face in the selfie matches the anchor image.

| Code       | Label    | Description                                                                                      |
| ---------- | -------- | ------------------------------------------------------------------------------------------------ |
| `Match`    | Match    | The face in the selfie matches the anchor image.                                                 |
| `No Match` | No Match | The face in the selfie does not match the anchor image.                                          |
| `Error`    | Error    | The face match check could not be completed due to a technical issue. This is the default value. |

## Default outcomes

The outcome logic uses only the overall result. The individual check capabilities are available for custom evaluation rules but are not used in the default outcomes.

| Outcome   | Condition                       | Description                                                                                       |
| --------- | ------------------------------- | ------------------------------------------------------------------------------------------------- |
| `Success` | Overall result is `Passed`      | All reverification checks passed. The selfie is live, not injected, and matches the anchor image. |
| `Failed`  | Overall result is `Failed`      | One or more reverification checks failed.                                                         |
| `ERROR`   | Default (no conditions matched) | An unexpected error occurred during processing.                                                   |

## Input payload

The module requires an `EncryptedSelfie` input with `selfieImageEncryption` set to `true`, along with an `AnchorImage` input to compare against. The anchor image must be prefilled at journey start.

The following is a sample payload used to submit an encrypted selfie and anchor image to the **Biometrics Reverification** module for processing.

```json JSON theme={null}
{
  "resourceId": "<resourceId>",
  "context": {
    "config": {
      "delivery": "api"
    },
    "subject": {
      "biometrics": [
        {
          "selfieImageEncryption": true,
          "selfieImage": "<base64-encoded string>",
          "anchorImage": "<base64-encoded string>"
        }
      ]
    }
  }
}
```

| Field                   | Required | Description                                                                                                                                                                                |
| ----------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `selfieImageEncryption` | Yes      | Must be set to `true` to indicate the selfie image has been encrypted for injection attack detection.                                                                                      |
| `selfieImage`           | Yes      | Base64-encoded encrypted selfie image captured from the end user.                                                                                                                          |
| `anchorImage`           | Yes      | Base64-encoded reference image used for comparison. This is the previously captured image from the subject's earlier onboarding or identity check, and must be prefilled at journey start. |

## Sample response

The following is a sample response from the **Biometrics Reverification** module. In this example the selfie is live and not injected, but does not match the anchor image, so the overall result is `Failed`.

```json JSON theme={null}
{
  "response": {
    "advice": {
      "contains": {
        "iadCaptureLiveness": "Live",
        "faceLiveness": "Live",
        "faceMatch": "No Match",
        "overallResult": "Failed"
      }
    },
    "outcome": "Failed"
  }
}
```

### Biometrics Reverification

## Capabilities

### Face match

Face match result.

| Value      | Description        |
| ---------- | ------------------ |
| `Match`    | Face matched       |
| `No Match` | Face did not match |
| `Error`    | Face match error   |

### Face liveness

Face liveness result.

| Value      | Description         |
| ---------- | ------------------- |
| `Live`     | Face is live        |
| `Not Live` | Face is not live    |
| `Error`    | Face liveness error |

### IAD: capture liveness

IAD capture liveness result.

| Value      | Description          |
| ---------- | -------------------- |
| `Live`     | Capture is live      |
| `Not Live` | Capture is not live  |
| `Error`    | Liveness check error |

### Overall result

Final outcome of the reverification process.

| Value    | Description           |
| -------- | --------------------- |
| `Passed` | Reverification passed |
| `Failed` | Reverification failed |
| `Error`  | Reverification error  |

### Biometrics Onboarding

## Capabilities

### Face match

Face match result.

| Value      | Description        |
| ---------- | ------------------ |
| `Match`    | Face matched       |
| `No Match` | Face did not match |
| `Error`    | Face match error   |

### Face liveness

Face liveness result.

| Value      | Description         |
| ---------- | ------------------- |
| `Live`     | Face is live        |
| `Not Live` | Face is not live    |
| `Error`    | Face liveness error |

### IAD: capture liveness

IAD capture liveness result.

| Value      | Description          |
| ---------- | -------------------- |
| `Live`     | Capture is live      |
| `Not Live` | Capture is not live  |
| `Error`    | Liveness check error |

### Overall result

Final outcome of the onboarding process.

| Value    | Description       |
| -------- | ----------------- |
| `Passed` | Onboarding passed |
| `Failed` | Onboarding failed |
| `Error`  | Onboarding error  |
