generateResponse
suspend fun generateResponse(version: OpenID4VP.Version, preselectedDocuments: List<Document>, source: PresentmentSource, appId: String?, origin: String?, request: JsonObject, requesterIdentities: List<RequesterIdentity>, onDocumentsInFocus: (documents: List<Document>) -> Unit = {}): OpenID4VP.OpenID4VPResponse
Generates an OpenID4VP response.
Return
the generated response according to OpenID4VP Section 8 Response.
Parameters
version
the version of OpenID4VP to generate a response for.
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.
source
an object for application to provide data and policy.
origin
the origin of the requester or null if not known.
request
the authorization request object according to OpenID4VP Section 5 Authorization Request.
requesterIdentities
verifier identities that were used to sign the request (there may be multiple for multisigned requests, or none for unsigned requests).
Throws
if the user canceled in a consent prompt.
if it's not possible to satisfy the request.