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

Instantiating the SDK

First, create an object of type FaceAuthenticator. This object is for you to configure all your business rules for the SDK:

FaceAuthenticator mFaceAuthenticator = new FaceAuthenticator.Builder(String mobileToken)
    // see table below
    .build();

All parameters annotated with @Nullable can be given null values, useful if you want to set only one of the parameters of a single method.

Builder method

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:

FaceAuthenticator.Builder("mobileToken")
    .setUseEmulator(true)
    .setUseRoot(true)
    .setUseDeveloperMode(true)
    .setUseAdb(true)
    .setUseDebug(true)
    .build();

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:

Intent mIntent = new Intent(context, FaceAuthenticatorActivity.class);
mIntent.putExtra(FaceAuthenticator.PARAMETER_NAME, mFaceAuthenticator);
startActivityForResult(mIntent, REQUEST_CODE);

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:

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (requestCode == REQUEST_CODE) {
        if (resultCode == RESULT_OK && data != null) {
            FaceAuthenticatorResult mFaceAuthenticatorResult = (FaceAuthenticatorResult) data.getSerializableExtra(FaceAuthenticatorResult.PARAMETER_NAME);
            // verifique mFaceAuthenticatorResult.getSDKFailure() para descobrir qual foi o motivo da finalizaĆ§Ć£o do SDK
        } else {
            // o usuƔrio fechou a activity
        }
    }
    super.onActivityResult(requestCode, resultCode, data);
}

FaceAuthenticatorResult

Last updated

Logo

2023 Ā© Caf. - All rights reserved