FaceAuthenticator (Deprecated)
Facematch with proof of life from your app's user, ideal for login flows or valuable financial transactions.
Required permissions
In the info.plist
file, add the permissions below:
Permission | Reason | Required? |
| To capture the user selfie | Yes |
Utilization
First, instantiate an object of type FaceAuthenticator
:
FaceAuthenticator.Builder
Parameter | Required? |
Usage token associated with your CAF account | Yes |
Identifier of the user in which is registered the face of the user who will perform the facematch. Currently, this value only accepts the user's CPF | Yes |
Enables/disables data collection for analytics | No. The default is |
Changes the default settings of the stability sensor. The threshold of this sensor is in the range of the last two accelerations collected from the device. | No. The default is "Keep the phone still" and 0.3, respectively |
Changes the document masks for success, failure and normal. Also allows you to change the sound and cancel buttons, which are at the top of the screen | No |
Change the color of the sound and cancel buttons that are at the top of the screen. Also change the color of the popup buttons, inflated before each document. | No |
Enables/disables sounds and the sound icon in the SDK | No. The default is |
Change the default network settings | No. The default is 60 (seconds) |
Allows you to set the capture per image. The beforePictureInterval attribute sets the time the user should stay with the face docked in the mask. The | No. The default is enabled. For beforePictureInterval the default is 2 (seconds). For |
Video capture setting method | No |
Allows to customize the SDK's eyes closed validation settings. The method takes as parameter | No. The default is |
Allows you to choose the environment in wich the SDK will run (production, beta). The method takes as parameter an enum | No. The default is |
Enum | Description |
| Will use the Trust Platform production environment to register the SDK executions. |
| Will use the Trust Platform beta environment to register the SDK executions. |
Each environment (beta and production) requires its own specific mobileToken, generated in the Trust platform of the respective environment.
After creating the FaceAuthenticator
type object, you can start the FaceAuthenticatorController
by passing it as a parameter in the constructor:
Getting the result
To get the result, you must implement the FaceAuthenticatorControllerDelegate
delegate in your controller:
FaceAuthenticatorResult
Parameter | Can it be null? |
Flag indicating whether the user's selfie passed the facematch with the photo stored on the CAF server with the respective CPF | No |
Signed response from the CAF server that performed the facematch. Use this parameter if you want an extra layer of security by checking that the signature of the response is not broken, caused by an intercepted request. If it is broken, there is a strong indication of request interception | Yes, in case of error |
Identifier of this run on our servers. If possible, save this field and send it along to our API. This way we will have more data about how the user behaved during the execution | Yes, if the user sets |
Defines the face of the camera that was used. Use | No |
FaceAuthenticatorFailure
Superclass that leads to the SDK shutdown. To find out what the reason was, find out which object class has the isKindOfClass()
method, equivalent to instanceof
in Java and is
in Dart:
isKindOfClass() | Description | Example |
| The token entered is not valid for the corresponding product | Parameterize "test123" as token in the SDK builder |
| You are missing some mandatory permission to run the SDK | Start DocumentDetector without camera permission granted |
| Internet connection failure | User was without internet during facematch in FaceAuthenticator |
| When an SDK request receives a status code of failure | In theory, it shouldn't happen. If it does, let us know! |
| There is no space on the user device's internal storage | When there is no space on the internal storage while capturing the document photo |
| There is no face record for the given | When the user authenticates with a |
Examples
Customizing the Layout
You can customize the layout by creating an object of type FaceAuthenticatorLayout
and passing it as a parameter to the FaceAuthenticatorBuilder
:
Last updated