Class Biometric

java.lang.Object
com.idanalyzer.Biometric

public class Biometric extends Object
Biometric face & liveness verification (POST /face, /liveness).
  • Method Details

    • setCustomData

      public Biometric setCustomData(String customData)
      Attach an arbitrary string to be stored with the transaction (e.g. an internal reference).
      Parameters:
      customData - the custom data string to store with the verification.
      Returns:
      this instance, for chaining.
    • setProfile

      public Biometric setProfile(Profile profile)
      Parameters:
      profile - the KYC profile to apply; its overrides are sent when non-empty.
      Returns:
      this instance, for chaining.
      Throws:
      InvalidArgumentException - if profile is null.
    • verifyFace

      public com.fasterxml.jackson.databind.JsonNode verifyFace(String referenceFaceImage, String facePhoto, String faceVideo)
      Perform 1:1 face verification against a reference image.
      Parameters:
      referenceFaceImage - the reference face image (file path, base64, URL or cache reference).
      facePhoto - the face photo to verify; used when non-empty, otherwise faceVideo is used.
      faceVideo - the face video to verify; used when facePhoto is empty.
      Returns:
      the API response as a JsonNode.
      Throws:
      InvalidArgumentException - if no profile is configured, the reference image is missing, or neither facePhoto nor faceVideo is supplied.
      ApiException - if the API returns an error or a transport error occurs.
    • verifyLiveness

      public com.fasterxml.jackson.databind.JsonNode verifyLiveness(String facePhoto, String faceVideo)
      Perform a standalone liveness check on a selfie photo or video.
      Parameters:
      facePhoto - the selfie photo to check; used when non-empty, otherwise faceVideo is used.
      faceVideo - the selfie video to check; used when facePhoto is empty.
      Returns:
      the API response as a JsonNode.
      Throws:
      InvalidArgumentException - if no profile is configured, or neither facePhoto nor faceVideo is supplied.
      ApiException - if the API returns an error or a transport error occurs.