Your digital SSI
Twyn SDK is the T4ISB mobile SDK that allows the enrollment as well as the identity validation of a Twyn user.
Our aim is to protect the user identity and give him the total control of his biometric data and SSI identity.
As defined by WIKIPEDIA, SSI is an approach to digital identity that gives individuals control of their digital identities. We want to help people protect their data and their identity.
Twyn SDK provides an activity to allow the person face enrollment. The client app has to implement EnrollFaceListener to be able to get the EnrollFaceResult.
EnrollFaceResult has two atributes:
- livenessScore: face enrollment checks the face liveness and returns a score between 0 and 100. The score 100 is a 100% live face and 0 is a fake one
- croppedFace: face enrollment returns a cropped face (bitmap format) so that the client app can use it for verification/identitfication purposes
Below an example of calling the enroll face activity (Kotlin verison)
FaceActivity.setFaceListener(this)
val myIntent = Intent(this@MainActivity, FaceActivity::class.java)
myIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
myIntent.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT)
startActivity(myIntent)
Once the face is enrolled, the client app will receive the result overriding the onEnrollFaceCompleted function:
override fun onEnrollFaceCompleted(enrollFaceResult: EnrollFaceResult?) {
if (enrollFaceResult != null) {
runOnUiThread {
Toast.makeText(
this@MainActivity,
"Successful Face Enrollment. Liveness Score ${enrollFaceResult.livenessScore}",
Toast.LENGTH_LONG
).show()
}
}
}
Twyn SDK provides an activity to allow the person fingerprints enrollment using the phone camera. The client app has to implement EnrollFingerListener to be able to get the EnrollFingersResult.
EnrollFingersResult has three atributes:
- leftHandScore: A 0-100 Quality score of the left hand.
- rightHandScore: A 0-100 Quality score of the right hand.
- fingersMap: map containing the images of the enrolled fingerprints
Below an example of calling the enroll fingers activity (Kotlin verison)
FingerActivity.setEnrollFingerListener(this)
val myIntent = Intent(this@MainActivity, FingerActivity::class.java)
myIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
myIntent.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT)
startActivity(myIntent)
Once the fingers are enrolled, the client app will receive the result overriding the onEnrollFingerCompleted function:
override fun onEnrollFingerCompleted(enrollFingersResult: EnrollFingersResult) {
val keys: Set<*> = enrollFingersResult.fingersMap.keys
println("keys $keys")
val i = keys.iterator()
while (i.hasNext()) {
val key = i.next() as String
println("key $key")
val value = enrollFingersResult.fingersMap[key]
println("value $value")
}
runOnUiThread {
Toast.makeText(
this@MainActivity,
"Left Hand Score ${enrollFingersResult.leftHandScore} \n Right Hand Score ${enrollFingersResult.rightHandScore}",
Toast.LENGTH_LONG
).show()
}
}
For more details please see the provided integration example.
Having trouble with Pages? contact support and we’ll help you sort it out.
Thanks to the people who contributed to Twyn SDK:
Nizar Elouaer 💻 |
Twyn SDK is licensed under the Apache License, Version 2.0. View a copy of the License file.