resolveSimpleConsentPromptData

suspend fun resolveSimpleConsentPromptData(requester: Requester, trustedRequesterIdentity: TrustedRequesterIdentity?, presentmentData: PresentmentData, preselectedDocuments: List<Document> = emptyList(), selections: List<List<Int>> = presentmentData.defaultSelections(preselectedDocuments), classifySimpleConsentFn: ClassifySimpleConsentFn = ::defaultClassifySimpleConsent): SimpleConsentPromptData?

Evaluates whether a credential presentment request qualifies as a simple, well-defined non-PII request and, if so, resolves the SimpleConsentPromptData to display on top of the biometric prompt.

Return

a SimpleConsentPromptData if the request qualifies as simple, or null if the full consent prompt should be displayed.

Parameters

requester

the relying party which is requesting the data.

trustedRequesterIdentity

trust information for the requester, or null if untrusted.

presentmentData

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

preselectedDocuments

the list of documents the user may have preselected earlier, or empty if none.

selections

the selected solution indices for each org.multipaz.presentment.PresentmentUseCase in PresentmentData.useCases. Defaults to presentmentData.defaultSelections(preselectedDocuments).

classifySimpleConsentFn

the function used to classify whether the request qualifies as a SimpleConsent. Defaults to defaultClassifySimpleConsent.