class OpenId4VpRegistry : DigitalCredentialRegistry


A registration request containing data that can serve the OpenID for Verifiable Presentations protocol based request.

The (type, id) properties together act as a primary key for this registry record stored with the Registry Manager. You later can use the same values of type + id to overwrite or delete a previously registered registry. Therefore, you should track the ids you use for various registry use cases (most often you only need one) so that you can later use them to update the same registry record.

If both credentialEntries and inlineIssuanceEntries are empty, the registry will never be used to answer a request.

Throws
IllegalArgumentException

if id or intentAction length is greater than 64 characters

Summary

Constants

const String

OpenID4VP 1.0 multi-signed protocol identifier.

const String

OpenID4VP 1.0 signed protocol identifier.

const String

OpenID4VP 1.0 unsigned protocol identifier.

Public constructors

OpenId4VpRegistry(
    credentialEntries: List<DigitalCredentialEntry>,
    id: String,
    intentAction: String,
    inlineIssuanceEntries: List<InlineIssuanceEntry>,
    supportedProtocols: List<String>
)

Inherited properties

From androidx.credentials.registry.provider.RegisterCredentialsRequest
ByteArray

the credentials to register

String

the unique id that identifies this registry, such that it won't be overwritten by other different registries of the same type

String

the intent action that will be used to launch your fulfillment activity when one of your credentials was chosen by the user, default to RegistryManager.ACTION_GET_CREDENTIAL when unspecified; when Credential Manager launches your fulfillment activity, it will build an intent with the given intentAction targeting your package, so this is useful when you need to define different fulfillment activities for different registries

ByteArray

the matcher wasm binary in bytes; the matcher will be interpreted and run in a safe and privacy-preserving sandbox upon an incoming request and it should output the qualified credentials given the credentials and the request; an invalid matcher (e.g. one that fails wasm interpretation or causes exceptions) will mean that your credentials will never be surfaced to the user

String

the type of the credentials being registered; this matches the androidx.credentials.Credential.type that these registered credentials will be returned as

Constants

PROTOCOL_OPENID4VP_1_0_MULTISIGNED

const val PROTOCOL_OPENID4VP_1_0_MULTISIGNEDString

OpenID4VP 1.0 multi-signed protocol identifier.

PROTOCOL_OPENID4VP_1_0_SIGNED

const val PROTOCOL_OPENID4VP_1_0_SIGNEDString

OpenID4VP 1.0 signed protocol identifier.

PROTOCOL_OPENID4VP_1_0_UNSIGNED

const val PROTOCOL_OPENID4VP_1_0_UNSIGNEDString

OpenID4VP 1.0 unsigned protocol identifier.

Public constructors

OpenId4VpRegistry

OpenId4VpRegistry(
    credentialEntries: List<DigitalCredentialEntry>,
    id: String,
    intentAction: String = RegistryManager.ACTION_GET_CREDENTIAL,
    inlineIssuanceEntries: List<InlineIssuanceEntry> = emptyList(),
    supportedProtocols: List<String> = listOf( PROTOCOL_OPENID4VP_1_0_SIGNED, PROTOCOL_OPENID4VP_1_0_UNSIGNED, PROTOCOL_OPENID4VP_1_0_MULTISIGNED, )
)
Parameters
credentialEntries: List<DigitalCredentialEntry>

the list of entries to register

id: String

the unique id for this registry

intentAction: String = RegistryManager.ACTION_GET_CREDENTIAL

the intent action that will be used to launch your fulfillment activity when one of your credentials was chosen by the user, default to RegistryManager.ACTION_GET_CREDENTIAL when unspecified; when Credential Manager launches your fulfillment activity, it will build an intent with the given intentAction targeting your package, so this is useful when you need to define different fulfillment activities for different registries

inlineIssuanceEntries: List<InlineIssuanceEntry> = emptyList()

the list of inline issuance entries to add the user credentials on the fly, if applicable

supportedProtocols: List<String> = listOf( PROTOCOL_OPENID4VP_1_0_SIGNED, PROTOCOL_OPENID4VP_1_0_UNSIGNED, PROTOCOL_OPENID4VP_1_0_MULTISIGNED, )

an ordered list of OpenId4VpProtocol identifiers that your registry supports, in descending order of preference (highest priority first). When an incoming OpenID4VP request is received, the system evaluates it against each protocol in this list sequentially, stopping immediately on the first successful match. Any protocol not included in this list is strictly ignored. Defaults to PROTOCOL_OPENID4VP_1_0_SIGNED, PROTOCOL_OPENID4VP_1_0_UNSIGNED, and PROTOCOL_OPENID4VP_1_0_MULTISIGNED