VerificationHelper

Helper used for engaging with and receiving documents from a remote mdoc verifier device.

This class implements the interface between an mdoc and mdoc verifier using the connection setup and device retrieval interfaces defined in ISO/IEC 18013-5:2021.

Reverse engagement as per drafts of 18013-7 and 23220-4 is supported. These protocols are not finalized so should only be used for testing.

Types

Link copied to clipboard
class Builder(context: Context, listener: VerificationHelper.Listener, executor: Executor)

Builder for VerificationHelper.

Link copied to clipboard
object Companion
Link copied to clipboard
interface Listener

Interface for listening to messages from the remote mdoc device.

Properties

Link copied to clipboard

The amount of time from when Engagement has been received until the request was sent.

Link copied to clipboard

The ephemeral key used by the reader for session encryption.

Link copied to clipboard

The amount of time from when the request was sent until the response was received.

Link copied to clipboard

The amount of time spent BLE scanning or 0 if no scanning occurred.

Link copied to clipboard

The session transcript.

Link copied to clipboard

The amount of time from first NFC interaction until Engagement has been received.

Functions

Link copied to clipboard
fun connect(connectionMethod: MdocConnectionMethod)

Establishes connection to remote mdoc using the given MdocConnectionMethod.

Link copied to clipboard

Ends the session with the remote device.

Link copied to clipboard

Processes a Tag received when in NFC reader mode.

Link copied to clipboard
Link copied to clipboard
fun reportDeviceDisconnected(transportSpecificTermination: Boolean)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun reportReaderEngagementReady(readerEngagement: ByteArray)
Link copied to clipboard
fun reportResponseReceived(deviceResponseBytes: ByteArray)
Link copied to clipboard
fun sendRequest(deviceRequestBytes: ByteArray)

Sends a request to the remote mdoc device.

Link copied to clipboard
fun setDeviceEngagementFromQrCode(qrDeviceEngagement: String)

Set device engagement received via QR code.

Link copied to clipboard
fun setSendSessionTerminationMessage(sendSessionTerminationMessage: Boolean)

Sets whether to send session termination message.

fun setUseTransportSpecificSessionTermination(useTransportSpecificSessionTermination: Boolean)

Sets whether to use transport-specific session termination.