send Response
Sends a credential presentation response to the verifier.
This function uses the referenced mobile credentials to send a response to the current verifier presentation request. If no current verifier request is found, an error will be thrown. If any of the referenced credentials do not exist OR multiple credentials resolve to the same doc type, suitable errors will be thrown. The function will automatically match the underlying individual MobileCredentialRequests from the verifier to the selected MobileCredentials via their doc types. Only the elements requested for each mobile credential will be sent in the response. Any MobileCredentialRequests where a MobileCredential of corresponding doc type wasn't supplied will result in a DocumentError being sent back to the verifier as per 18013-5. Any elements requested for a specific MobileCredential that are unavailable will result in an ElementError being sent back to the verifier as per 18013-5. This function requires user authentication when the user has not been authenticated within the last 30 seconds. If a suitable user authentication mechanism is not setup on the device OR authentication fails for any reason, suitable errors will be thrown.
Parameters
String array of credential Ids used to retrieve mobile credentials from storage and included in the response to the verifier
Android activity used to perform user authentication
Optional parameter which controls whether to terminate the session as part of sending the response. Defaults to false, meaning the session is not terminated.
Throws
If the SDK API is called before the SDK is initialised.
If the session state is not AwaitingResponse
.
If user authentication is not set up on the device.
If the user cancels authentication.
If a biometric lockout occurs during authentication.
If a general authentication error occurs.
If a credentials presentation could not be created.
If any credential ID is invalid or not found.
If there are multiple credentials with the same document type.
If the session is not in the established state.
If an error occurs while encoding the device response.
If there is a failure during data transport.
If the session status code is sent and the session is terminated.
If the session is inactive for too long and times out.