Verification is very much like identification but requires not only user's live video bu also login and password. To perform verification, first create FFLVerification instance:

val vn = FFLVerification(api, 0.75)

Where api is an FFLApi class instance described above and the 0.75 is a image tolerance threshold representing how close the face on the live video must match one in the registered document, reasonable values are in 0.75 .. 0.9 range. Please consult FFL server documentation for more details on this threshold parameter.

When verification instance is ready, login to get the dossier by user's login and password:

val dossier = vn.login("foo", "bar") ?: run {
     println("Incorrect credentials")
     return "invalid_login"

Here foo and bar are login and password of the user being verified. Login method returns null if the login and password combination is not valid.

After successful login, dossier object is available to perform application-specific checks. Next, the live selfie movie of the user should be recorded and checked:

 when ( vn.verify(slefieMp4File) ) {
     is LIBadVideo -> {
        println("Bad video, error: ${r.code}, please try again")
        // record new video and try again
     is LIFailed -> {
        println("unexpected error: ${r.message}")
        // and try again with the same instance
     LINotFound -> {
        // this means the video does not match the logged in profile  documents:
        println("You aren't the person that owns that login")
        // report failure, record new selfie if need

     is LISuccess -> {
        println("Your personality has been approved.")
        // successful verification, the person is one matching ID documents registered

where `selfieMp4File' is a string with a valid path to a mp4 file containing user's live selfie video. Please see identification section above for this file requirements.

Unsuccessful verification could be retried with the same verification object instance.

Please see also most recent and complete documentation of the FFLVerification class.