mdocPerformFaceMatching

suspend fun mdocPerformFaceMatching(selection: PresentmentSelection, source: PresentmentSource, onWaitingForUserInput: () -> Unit = {}): List<Credential>

Performs face matching for credentials in selection according to the wallet policy.

For each credential in selection, PresentmentSource.getFaceMatchingMode is queried. If face matching is determined to be required, the user is prompted to perform face matching against the credential's reference portrait.

Return

A list of Credential instances for which face matching was performed and succeeded.

Parameters

selection

The PresentmentSelection obtained from consent.

source

The source of truth used for presentment.

onWaitingForUserInput

Called when waiting for input from the user (such as face matching).

Throws

if the coroutine was canceled.

if face matching failed or was canceled.

if an unexpected error occurred.