uriSchemePresentment

suspend fun uriSchemePresentment(source: PresentmentSource, uri: String, appId: String?, origin: String?, httpClientEngineFactory: HttpClientEngineFactory<*>, onDocumentsInFocus: (documents: List<Document>) -> Unit = {}, onTelemetry: (telemetry: PresentmentTelemetry) -> Unit = {}): String?

Present credentials according to OpenID4VP 1.0 w/ URI schemes.

Return

the redirect URI, caller should open this in the user's default browser.

Parameters

source

the source of truth used for presentment.

uri

the referrer.

appId

the appId of the browser or app which invoked us, if known.

origin

the origin, if known.

httpClientEngineFactory

a HttpClientEngineFactory.

onDocumentsInFocus

called with the documents currently selected for the user, including when first shown. If the user selects a different set of documents in the prompt, this will be called again.

onTelemetry

callback invoked with the final PresentmentTelemetry. This is guaranteed to be called both before returning normally and before an exception is thrown.

Throws

if user authentication failed or was canceled.

if face matching failed or was canceled.

if the user canceled in a consent prompt.

if it's not possible to satisfy the request.