During the authentication process, a user’s face is processed and compared to the one which was previously stored during the enrollment process. As a result, your custom token (ascii string) is returned if the authentication is successful.
You can see the KeylessSDK as a blackbox where, during the enrollment, you store something which will be retrieved, if the user is who he claims to be, during the authentication.
val configuration =
authenticationConfiguration = configuration,
onCompletion = { result ->
when (result) {
is Keyless.KeylessResult.Success -> Log.d("KeylessSDK ", "Authentication success - token = ${result.customToken}")
is Keyless.KeylessResult.Failure -> Log.d("KeylessSDK ", "Authentication failure - error code ${result.error.code}")
let configuration =
authenticationConfiguration: configuration,
onCompletion: { result in
switch result {
case .success(let success):
case .failure(let error):

Authentication parameters

It is possible to specify authentication parameters using the AuthenticationConfiguration builder.

Liveness Settings

Using withLivenessSettings you can specify the liveness security level with LivenessConfiguration and a timeout to perform the liveness.

Operation info

Using the withOperationInfo it is possible to specify an operation id String and a payload String that will be stored on the Keyless backend if the authentication succeeds. Each operation id must be unique, you will get an error if you re-use the same operation id. Details on how to query our backend for stored operations are available on Operations API.

Message signing

Using the withMessageToSign method it is possible to specify a message (string) that will be signed by the user signing key. If the authentication is successful, the result object in the completion callback will contain the signedMessage parameter: a jwt verifiable using the user signing public key returned by the getUserSigningPublicKey api.

Authentication Delay

Using withDelay you can specify the delay (in seconds) before the liveness starts. This will not prevent the camera from starting, it will just delay the liveness analysis start.

Success Animation

Using withSuccessAnimation you can specify whether the Keyless SDK should display a checkmark indicating a successful authentication.

Retrieve Backup

Using retrievingBackup you can specify whether you want to receive the backup data in the result of the authenticate. When calling authenticate with the retrievingBackup parameter to the builder, you will find a KeylessBackup in the result.