RemoteCredentialMetadataRegistry

class RemoteCredentialMetadataRegistry @JvmOverloads constructor(httpClient: HttpClient, clock: Clock, val documentUrls: MutableMap<SdJwtVcType, String> = mutableMapOf(), aliases: Map<CredentialMetadataLookup, SdJwtVcType> = emptyMap(), integrityMetadata: Map<SdJwtVcType, W3cSubresourceIntegrityMetadata> = emptyMap(), json: Json = Json.Default, integrityChecker: SdJwtTypeMetadataDocumentIntegrityChecker = SdJwtTypeMetadataDocumentIntegrityChecker.DEFAULT) : CredentialMetadataRegistry(source)

A CredentialMetadataRegistry that fetches metadata documents over HTTP, mirroring at.asitplus.wallet.lib.data.StaticCredentialMetadataRegistry but with remote retrieval.

This registry owns the vct -> URL mapping (documentUrls); the underlying KtorSdJwtTypeMetadataDocumentRetriever is given only a lookup (documentUrls::get), so the mapping stays in the registry, not in the retriever. The same URL is reused as the resolved scheme's schemaUri.

documentUrls is intentionally minimal — fill it with the known vct/URL pairs. The map is shared with the retriever, so later additions are picked up for both lookup and retrieval (incl. extends parents).

Identifier resolution mirrors the static registry: an aliases entry wins; otherwise for SD_JWT the identifier is the vct directly. Mapping a decoupled W3C vcType / ISO docType to its vct needs an aliases entry until richer discovery is added.

Constructors

Link copied to clipboard
constructor(httpClient: HttpClient, clock: Clock, documentUrls: MutableMap<SdJwtVcType, String> = mutableMapOf(), aliases: Map<CredentialMetadataLookup, SdJwtVcType> = emptyMap(), integrityMetadata: Map<SdJwtVcType, W3cSubresourceIntegrityMetadata> = emptyMap(), json: Json = Json.Default, integrityChecker: SdJwtTypeMetadataDocumentIntegrityChecker = SdJwtTypeMetadataDocumentIntegrityChecker.DEFAULT)

Properties

Link copied to clipboard

vct -> hosted document URL. Owned here; fill in the known pairs.

Functions

Link copied to clipboard
open suspend override fun findEntry(identifier: String, representation: ConstantIndex.CredentialRepresentation): ResolvedCredentialMetadata?
Link copied to clipboard