Links

Authentication

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, the 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.
Android
iOS
val configuration = AuthenticationConfiguration.builder
// operation info is optional (same "operation_id" cannot be re-used)
.withOperationInfo(operationId = "operation_id", payload = "your payload")
// message signing is optional
.withMessageToSign("a message to sign")
.build()
Keyless.authenticate(
authenticationConfiguration = configuration,
onCompletion = { result ->
when (result) {
is Keyless.KeylessResult.Success -> Log.d("KeylessSDK ", "Authentication success")
is Keyless.KeylessResult.Failure -> Log.d("KeylessSDK ", "Authentication failure - error code ${result.error.code}")
}
}
)
let configuration = Keyless.AuthenticationConfiguration.builder
// operation info is optional (same "operation_id" cannot be re-used)
.withOperationInfo(id: "operation_id", payload: "your payload")
// message signing is optional
.withMessageToSign("a message to sign")
.build()
Keyless.authenticate(
authenticationConfiguration: configuration,
onCompletion: { result in
switch result {
case .success(let success):
print(success.token)
case .failure(let error):
break
}
})

Authentication parameters

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

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 successful. Details on how to query our backend for stored operations are availabe on Operation Confirmation API.

Message signing

Using the withMessageSigning 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.

Liveness Settings

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

Success Animation

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

Retrieve Backup

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