SimplePresentmentSource

class SimplePresentmentSource(val documentStore: DocumentStore, val documentTypeRepository: DocumentTypeRepository, val zkSystemRepository: ZkSystemRepository? = null, resolveTrustFn: suspend (requester: Requester) -> TrustMetadata? = { requester -> null }, showConsentPromptFn: ShowConsentPromptFn = ::promptModelRequestConsent, val preferSignatureToKeyAgreement: Boolean = true, val domainMdocSignature: String? = null, val domainMdocKeyAgreement: String? = null, val domainKeylessSdJwt: String? = null, val domainKeyBoundSdJwt: String? = null) : 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, resolveTrustFn: suspend (requester: Requester) -> TrustMetadata? = { requester -> null }, showConsentPromptFn: ShowConsentPromptFn = ::promptModelRequestConsent, preferSignatureToKeyAgreement: Boolean = true, domainMdocSignature: String? = null, domainMdocKeyAgreement: String? = null, domainKeylessSdJwt: String? = null, domainKeyBoundSdJwt: String? = null)

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
Link copied to clipboard

the domain to use for KeylessSdJwtVcCredential instances or null.

Link copied to clipboard

the domain to use for org.multipaz.mdoc.credential.MdocCredential instances using mdoc MAC authentication or null.

Link copied to clipboard

the domain to use for org.multipaz.mdoc.credential.MdocCredential instances using mdoc ECDSA authentication 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?
open suspend override fun selectCredential(document: Document?, request: Request, 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.