DigitalCredentialRegistry


abstract class DigitalCredentialRegistry : RegisterCredentialsRequest

Known direct subclasses
PreviewRegistry

A registration request containing data that can serve the preview protocol based request.


A request to register digital credentials with Credential Manager.

Summary

Constants

const Int

The credential should be displayed with the UI styles that serves the verification use case.

Public constructors

DigitalCredentialRegistry(
    id: String,
    credentials: ByteArray,
    matcher: ByteArray,
    intentAction: 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

DISPLAY_TYPE_VERIFICATION

const val DISPLAY_TYPE_VERIFICATION = 0: Int

The credential should be displayed with the UI styles that serves the verification use case. This is the default use case.

Public constructors

DigitalCredentialRegistry

Added in 1.0.0-alpha01
DigitalCredentialRegistry(
    id: String,
    credentials: ByteArray,
    matcher: ByteArray,
    intentAction: String = RegistryManager.ACTION_GET_CREDENTIAL
)
Parameters
id: String

the unique id that identifies this registry, such that it won't be overwritten by other different registries of the same type; in other words, registering the registry with the same id will overwrite the existing one when applicable

credentials: ByteArray

the credentials in raw bytes

matcher: 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

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