Links

Enrollment

Enrollment is the process to create a user account with Keyless. During the enrollment the user's face is processed and it is possible to protect with the user's biometrics a custom token that you provide as input.
Depending on your application logic, you can choose to use different tokens.
Your custom token 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.
Keyless accepts only ASCII strings as custom token.
For the enrolment, a full face image is required and the process cannot be completed if any occlusion is present, like a face mask.
Android
iOS
val configuration = EnrollmentConfiguration.builder
// custom token is required
.withCustomToken("myToken")
.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")
.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.

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

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 enrollment 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.

Retrieve backup

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

Enrollment 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.

Enrollment Selfie

Only available to some customers. If you are not eligible you will get an error. Using withEnrollmentSelfie in the builder you can specify whether you want to get the image used during enroll in the result.

Retrieving UserInfo

All information concerning a user can be retrieved after a successful enroll with the retrievingUserInfo builder parameter. This is a blob that represents a user and that can be used to enroll a user without restoring from a backup. For more info see the multi-user API.