Consent

fun Consent(modifier: Modifier = Modifier, requester: Requester, trustMetadata: TrustMetadata?, credentialPresentmentData: CredentialPresentmentData, preselectedDocuments: List<Document>, imageLoader: ImageLoader?, onDocumentsInFocus: (documents: List<Document>) -> Unit, onConfirm: (selection: CredentialPresentmentSelection) -> Unit, onCancel: () -> Unit = {})

A composable used for obtaining consent when presenting one or more credentials.

Parameters

modifier
requester

the relying party which is requesting the data.

trustMetadata

TrustMetadata conveying the level of trust in the requester, if any.

credentialPresentmentData

the combinations of credentials and claims that the user can select.

preselectedDocuments

the list of documents the user may have preselected earlier (for example an OS-provided credential picker like Android's Credential Manager) or the empty list if the user didn't preselect.

imageLoader

a ImageLoader.

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.

onConfirm

called when the user presses the "Share" button, returns the user's selection.

onCancel

called when the sheet is dismissed.