Iso180137AnnexCHolder
class Iso180137AnnexCHolder @JvmOverloads constructor(keyMaterial: KeyMaterial = EphemeralKeyWithoutCert(), holder: Holder = HolderAgent(keyMaterial))(source)
Handles ISO/IEC 18013-7 Annex C requests received through the W3C Digital Credentials API.
This is intentionally separate from OpenId4VpHolder, because Annex C is not OpenID4VP even when both protocols are transported through the same browser API.
Constructors
Link copied to clipboard
constructor(keyMaterial: KeyMaterial = EphemeralKeyWithoutCert(), holder: Holder = HolderAgent(keyMaterial))
constructor(keyMaterial: KeyMaterial = EphemeralKeyWithoutCert(), holder: Holder = HolderAgent(keyMaterial), signDeviceAuthDetached: SignCoseDetachedFun<ByteArray> = SignCoseDetached(
keyMaterial, CoseHeaderNone(), CoseHeaderNone()
))
Functions
Link copied to clipboard
fun createPresentationRequest(request: RequestParametersFrom.IsoMdocDcApi): KmmResult<CredentialPresentationRequest.IsoDeviceRetrieval>
Adapts the Annex C device request to the presentation model used by VC-K's credential matcher.
Link copied to clipboard
suspend fun finalizeResponse(request: RequestParametersFrom.IsoMdocDcApi, credentialPresentation: CredentialPresentation.IsoDeviceRetrievalPresentation): KmmResult<EncryptedResponse>
Creates and encrypts the selected mdoc device response according to ISO/IEC 18013-7 Annex C.
Link copied to clipboard
suspend fun getMatchingCredentials(request: RequestParametersFrom.IsoMdocDcApi): KmmResult<IsoDeviceRetrievalMatchingResult<SubjectCredentialStore.StoreEntry>>
Matches mdoc credentials, restricted to platform-selected credential IDs when supplied in request.