ConsentPromptRequest

class ConsentPromptRequest(val requester: Requester, val trustedRequesterIdentity: TrustedRequesterIdentity?, val presentmentData: PresentmentData, val preselectedDocuments: List<Document>, val onDocumentsInFocus: (documents: List<Document>) -> Unit, val transactionDataRendererRepository: TransactionDataRendererRepository?, val requesterHistory: RequesterHistory? = null, val classifyPurposesFn: ClassifyPurposesFn = ::defaultClassifyPurposes, val classifyRiskFn: ClassifyRiskFn = ::defaultClassifyRisk, val classifySimpleConsentFn: ClassifySimpleConsentFn = ::defaultClassifySimpleConsent, val platformConsentOptions: PlatformConsentOptions? = null)

Class that holds parameters that are needed to present a consent prompt dialog to the user.

Parameters

requester

the relying party which is requesting the data.

trustedRequesterIdentity

conveys the level of trust in the requester, if any.

presentmentData

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

preselectedDocuments

a 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.

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.

transactionDataRendererRepository

the TransactionDataRendererRepository the prompt uses to find renderers for transaction data, or null to use only the built-in rendering.

requesterHistory

an optional RequesterHistory used to query whether the user has shared credentials with requester before.

classifyPurposesFn

a function used to classify the org.multipaz.consent.PresentmentPurposes for the active selection.

classifyRiskFn

a function used to evaluate the org.multipaz.consent.ConsentRiskAssessment for the active selection.

classifySimpleConsentFn

a function used to evaluate whether the request qualifies for a combined simple consent and biometric authentication prompt.

platformConsentOptions

optional PlatformConsentOptions with platform-specific consent options.

Constructors

Link copied to clipboard
constructor(requester: Requester, trustedRequesterIdentity: TrustedRequesterIdentity?, presentmentData: PresentmentData, preselectedDocuments: List<Document>, onDocumentsInFocus: (documents: List<Document>) -> Unit, transactionDataRendererRepository: TransactionDataRendererRepository?, requesterHistory: RequesterHistory? = null, classifyPurposesFn: ClassifyPurposesFn = ::defaultClassifyPurposes, classifyRiskFn: ClassifyRiskFn = ::defaultClassifyRisk, classifySimpleConsentFn: ClassifySimpleConsentFn = ::defaultClassifySimpleConsent, platformConsentOptions: PlatformConsentOptions? = null)

Properties