openID4VCIRefreshCredentials

suspend fun openID4VCIRefreshCredentials(document: Document, authorizationData: ByteString, clientPreferences: OpenID4VCIClientPreferences, backend: OpenID4VCIBackend): Int

Synchronously requests the provisioning of additional credentials to an existing Document.

Note that this bypasses the model and throws an exception if something goes wrong.

It is guaranteed that no network I/O to the issuer will be performed unless there are credentials that actually need to be fetched (as determined by AbstractDocumentProvisioningHandler.haveCredentialsToRefresh).

Return

number of credentials fetched

Parameters

document

Document where credentials should be provisioned

authorizationData

authorization data from a previous provisioning session (see DocumentProvisioningHandler.AbstractDocumentMetadataHandler.updateDocumentMetadata authorizationData parameter)

clientPreferences

configuration parameters for OpenID4VCI client

backend

interface to the wallet back-end service

Throws

if an error occurred