SimplePresentmentSource

class SimplePresentmentSource(val documentStore: DocumentStore, val documentTypeRepository: DocumentTypeRepository, val zkSystemRepository: ZkSystemRepository? = null, val eventLogger: EventLogger? = null, resolveTrustFn: suspend (requester: Requester) -> TrustMetadata? = { requester -> null }, showConsentPromptFn: ShowConsentPromptFn = ::promptModelRequestConsent, val preferSignatureToKeyAgreement: Boolean = true, val domainsMdocSignature: List<String> = emptyList(), val domainsMdocKeyAgreement: List<String> = emptyList(), val domainsKeylessSdJwt: List<String> = emptyList(), val domainsKeyBoundSdJwt: List<String> = emptyList()) : PresentmentSource

An implementation of PresentmentSource for when using ISO mdoc and IETF SD-JWT VC credentials.

This implementation assumes that Credentials for a Document are organized by domain corresponding to the type of credential.

Constructors

Link copied to clipboard
constructor(documentStore: DocumentStore, documentTypeRepository: DocumentTypeRepository, zkSystemRepository: ZkSystemRepository? = null, eventLogger: EventLogger? = null, resolveTrustFn: suspend (requester: Requester) -> TrustMetadata? = { requester -> null }, showConsentPromptFn: ShowConsentPromptFn = ::promptModelRequestConsent, preferSignatureToKeyAgreement: Boolean = true, domainsMdocSignature: List<String> = emptyList(), domainsMdocKeyAgreement: List<String> = emptyList(), domainsKeylessSdJwt: List<String> = emptyList(), domainsKeyBoundSdJwt: List<String> = emptyList())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val documentStore: DocumentStore

the DocumentStore which holds credentials that can be presented.

Link copied to clipboard

a DocumentTypeRepository which holds metadata for document types.

Link copied to clipboard

the domains to use for org.multipaz.sdjwt.credential.KeyBoundSdJwtVcCredential instances, will be tried in order.

Link copied to clipboard

the domains to use for KeylessSdJwtVcCredential instances, will be tried in order.

Link copied to clipboard

the domains to use for org.multipaz.mdoc.credential.MdocCredential instances using mdoc MAC authentication, will be tried in order.

Link copied to clipboard

the domains to use for org.multipaz.mdoc.credential.MdocCredential instances using mdoc ECDSA authentication, will be tried in order.

Link copied to clipboard
open override val eventLogger: EventLogger?

an EventLogger for logging events or null.

Link copied to clipboard

whether to use mdoc ECDSA authentication even if mdoc MAC authentication is possible (ISO mdoc only).

Link copied to clipboard

the ZkSystemRepository to use or null.

Functions

Link copied to clipboard
open suspend override fun resolveTrust(requester: Requester): TrustMetadata?

Determines if a requester is trusted.

Link copied to clipboard
open suspend override fun selectCredential(document: Document, requestedClaims: List<RequestedClaim>, keyAgreementPossible: List<EcCurve>): Credential?

Chooses a credential from a document.

Link copied to clipboard
open suspend override fun showConsentPrompt(requester: Requester, trustMetadata: TrustMetadata?, credentialPresentmentData: CredentialPresentmentData, preselectedDocuments: List<Document>, onDocumentsInFocus: (documents: List<Document>) -> Unit): CredentialPresentmentSelection?

A function to show a consent prompt.