Links

Enrollment

During the enrolment process, a user’s face is processed, user account is created and a token is provided and stored in the ascii string format. For the enrolment, a full face image is required and the process cannot be completed if any occlusion is present, like a face mask.
Depending on your application logic, you can choose to use different tokens. This could be a secret that you have provided to the app from the backend, the seed of an OTP protocol, or anything else. If you only need to know just the result of the authentication (success/failed), you can provide any constant value as token.
Android
iOS
val configuration = EnrollmentConfiguration.builder
// custom token is required
.withCustomToken("myToken")
// device info is optional
.withDeviceInfo("device-name")
// operation info is optional (same "operation_id" cannot be re-used)
.withOperationInfo(operationId = "operation_id", payload = "your payload")
// enrollmentSelfie is optional
.withEnrollmentSelfie()
.build()
Keyless.enroll(
enrollmentConfiguration = configuration,
onCompletion = { result ->
when (result) {
is Keyless.KeylessResult.Success -> Log.d("KeylessSDK ", "Enroll success - userId ${result.value.keylessId}")
is Keyless.KeylessResult.Failure -> Log.d("KeylessSDK ", "Enroll failure - error code ${result.error.code}")
}
}
)
let configuration = Keyless.EnrollmentConfiguration.builder
// custom token is required
.withCustomToken("myToken")
// device info is optional
.withDeviceInfo("device-name")
// operation info is optional (same "operation_id" cannot be re-used)
.withOperationInfo(id: "operation_id", payload: "your payload")
// enrollment selfie is optional
.withEnrollmentSelfie()
.build()
Keyless.enroll(
enrollmentConfiguration: configuration,
onProgress: { progress in
print("Enrollment progress: \(progress)")
},
onCompletion: { result in
switch result {
case .success(let enrollmentSuccess):
print("Enrollment finished successfully. UserID: \(enrollmentSuccess.keylessId)")
case .failure(let error):
print("Enrollment finished with error: \(error.message)
}
})
Enrollment parameters
It is possible to specify enrollment parameters using the EnrollmentConfiguration builder.

Custom token

Using the withCustomToken method it is possible to specify the ascii string that will be securely stored in the Keyless network. The same string will be returned after a successful authentication.

Device info

Using the withDeviceInfo method it is possible to specify any additional information related to the device. This information is encrypted and could be decrypted only by the user's devices.

Backup Restore

Only in case you are restoring a backup that you previously performed with Keyless, you can use withBackup instead of withCustomToken. You will need to pass the backupKey and backupData as parameters.
Note that withBackup and withCustomToken are mutually exclusive

Operation info

Using the withOperationInfo method it is possible to specify an id string and a payload string that will be stored on the Keyless backend if the authentication is succeeded. Details on how to query our backend for stored operations are availabe on Operation Confirmation API.

Liveness Settings

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

Retrieve backup

Using retrievingBackup in the builder you can specify whether you want to receive the backup data in the result of the enroll. When enabling the retrievingBackup flag you will find a KeylessBackup in the result.

Enrollment Selfie

Only available to some customers. Using withEnrollmentSelfie in the builder you can specify whether you want to get the image used to enroll in Keyless in the result of the enroll.