finishProcessingRequest

suspend fun finishProcessingRequest(requestedDocType: String, credentialId: String, documentRequest: DocumentRequest, onFinishedProcessing: (ByteArray) -> Unit, onAuthenticationKeyLocked: (mdocCredential: MdocCredential) -> Unit, keyUnlockData: KeyUnlockData? = null, credential: MdocCredential? = null)

Finish processing the request and produce response bytes to be sent to requesting party. This is called once the user accepted various prompts (ie. immediately after the consent prompt,

  • after biometric prompt if required)

At minimum, expects 3 arguments generated from startProcessingRequest along with a callback for when processing is finished as well as a callback in case the authentication key is locked. In the case of a locked key, this function can be called again with that key which was locked and its corresponding keyUnlockData.

Parameters

requestedDocType

the type of credential document requested

credentialId

the id of the credential to send data from

documentRequest

the object containing list of DataElements for the user to approve

onFinishedProcessing

callback when processing finished to give UI a chance to update

onAuthenticationKeyLocked

callback when the authentication key is locked to give UI a chance to prompt user for authentication

keyUnlockData

key unlock data for a specific authenticated key

credential

a specified authentication key