FaceAuthenticator (Deprecated)
Facematch with proof of life from the user of your app, ideal for login flows or valuable financial transactions.
SDK size
A maximum of about 3.8 MB, which may decrease because of these elements.
Analytics
Our SDKs by default collect information about the user and running environment to better map fraudsters and understand their behaviors. We recommend keeping this collection active as the only purpose of this data is for fraud reduction, but if you wish, you can disable it by .setAnalyticsSettings(boolean useAnalytics)
parameter.
Runtime permissions
Permission | Reason | Required |
---|---|---|
| To capture the user selfie | Yes |
Instantiating the SDK
First, create an object of type FaceAuthenticator
. This object is for you to configure all your business rules for the SDK:
All parameters annotated with
@Nullable
can be givennull
values, useful if you want to set only one of the parameters of a single method.
Builder method
Parameter | Required |
---|---|
Usage token associated with your CAF account. | Yes. |
User identifier to perform facematch. Currently, this value accepts only the user's CPF. | Yes. |
Enables/disables data collection for analytics. | No, the default is |
Changes the default settings of the stability sensor. Apply | No. The default time is 1000 ms and the default threshold is 0.7 m/s². |
Defines the capture settings. The method accepts instances of the | No. The default is |
Replaces the default SDK layout. Create a file in your project's layout folder, copy this template and make the desired changes. | No. The default is this |
Changes the face capture masks: SUCCESS, NORMAL, and FAIL, in that order. If you use this option, use masks with the same detection area as the face, this region is very important for the algorithm to capture. | |
Replaces the SDK's default style. In your project's styles.xml file, copy this template and edit it. | No. The default is this |
Enables/disables the button for the user to switch between the front and rear camera. | No. The default is |
Sets the timeout interval for SDK requests. | No. The default is 60 (seconds) |
Allows you to enable/disable features of the SDK that consume GoogleServices in the SDK, we do not recommend disabling the services because of the loss of security. | No. The default is |
Enables the use of emulators when | No. The default is |
Allows the use of root devices when | No. The default is |
Enables the use of developer mode when | No. The default is |
Enables Android Debug Bridge (ADB) debugging mode when | No. The default is |
Allows you to use the app in debug mode when | No. The default is |
Enables/disables playback of SDK audios. | No. The default is |
It allows you to customize the audio used by the SDK. | No. The default is "Registro Facial". |
Enables/disables the brightness increment of the device on opening the SDK. | No. The default is |
Allows you to customize the SDK's open-eye validation settings. The method expects as parameter enable to enable or disable validation, and threshold, value between 0.0 and 1.0Allows you to customize the SDK's open-eye validation settings. The method expects 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.
Security validations
We are constantly taking actions to make the product more and more secure, mitigating a number of attacks observed in the capture process and, consequently, reducing as many possible identity frauds as possible. The SDK has some blocks that may prevent its execution in certain contexts. To disable them, you can use the methods as shown in the example below:
Disabling security validations is recommended for testing purposes only. For publishing your application in production, we recommend using the default settings.
Starting Activity
After creating the FaceAuthenticator
, start the FaceAuthenticatorActivity
by passing this object as a parameter via extra intent:
Getting the result
To get the FaceAuthenticatorResult
object, which contains the captures taken by the SDK, override the onActivityResult
method in the same activity that you started the FaceAuthenticatorActivity
:
FaceAuthenticatorResult
Parameter | Allow null |
---|---|
Flag that indicates whether the captured selfie passed face match with the photo stored on the CAF server and the respective CPF entered by the user. | No |
Signed response from the CAF server that performed the facematch. Use this parameter if you want an extra layer of security, checking that the signature of the response is not broken, or 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 execution on our servers. If possible, save this field and send it along to our API. This way we will have more data on how the user behaved during the execution. | Yes, if the user sets |
Object that tells you the reason for the SDK shutdown. For more information, see here. | Yes, in case of success |
Defines the face of the camera that was used. Use | No |
Last updated