registerExtensionLibrary

fun registerExtensionLibrary(credentialScheme: ConstantIndex.CredentialScheme, serializersModule: SerializersModule? = null)

Register credentialScheme to be used with this library, e.g. in OpenID protocol implementations.

Specify serializersModule if the credential scheme supports ConstantIndex.CredentialRepresentation.PLAIN_JWT, i.e. it implements a subclass of at.asitplus.wallet.lib.data.CredentialSubject that needs to be de/serialized.


fun registerExtensionLibrary(credentialScheme: ConstantIndex.CredentialScheme, serializersModule: SerializersModule? = null, serializerLookup: SerializerLookup, itemValueEncoder: ItemValueEncoder, itemValueDecoder: ItemValueDecoder, jsonValueEncoder: JsonValueEncoder)

Register credentialScheme to be used with this library, e.g. in OpenID protocol implementations. Used for credentials supporting at.asitplus.wallet.lib.data.ConstantIndex.CredentialRepresentation.ISO_MDOC, which need to specify several functions to allow encoding any values in at.asitplus.wallet.lib.iso.IssuerSignedItem. See the function typealiases for implementation notes.

Parameters

serializerLookup

used to build the serializer descriptor for at.asitplus.wallet.lib.iso.IssuerSignedItem

itemValueEncoder

used to actually serialize the element value in at.asitplus.wallet.lib.iso.IssuerSignedItemSerializer

itemValueDecoder

used to actually deserialize Any object in at.asitplus.wallet.lib.iso.IssuerSignedItemSerializer

jsonValueEncoder

used to describe the credential in input descriptors used in verifiable presentations, e.g. when used in SIOPv2


Deprecated

Please use methods not using the data class

Replace with

registerExtensionLibrary(credentialScheme, serializersModule)

Register the extension library with information from data.