Package com.idanalyzer
Class Biometric
java.lang.Object
com.idanalyzer.Biometric
Biometric face & liveness verification (POST /face, /liveness).
-
Method Summary
Modifier and TypeMethodDescriptionsetCustomData(String customData) Attach an arbitrary string to be stored with the transaction (e.g.setProfile(Profile profile) Attach a KYC profile (required beforeverifyFace(java.lang.String, java.lang.String, java.lang.String)/verifyLiveness(java.lang.String, java.lang.String)).com.fasterxml.jackson.databind.JsonNodeverifyFace(String referenceFaceImage, String facePhoto, String faceVideo) Perform 1:1 face verification against a reference image.com.fasterxml.jackson.databind.JsonNodeverifyLiveness(String facePhoto, String faceVideo) Perform a standalone liveness check on a selfie photo or video.
-
Method Details
-
setCustomData
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
Attach a KYC profile (required beforeverifyFace(java.lang.String, java.lang.String, java.lang.String)/verifyLiveness(java.lang.String, java.lang.String)).- 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
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.
-