DigitalCredentialRegistry


public abstract class DigitalCredentialRegistry extends 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

static final int

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

Public constructors

DigitalCredentialRegistry(
    @NonNull String id,
    @NonNull byte[] credentials,
    @NonNull byte[] matcher
)

Inherited methods

From androidx.credentials.registry.provider.RegisterCredentialsRequest
final @NonNull byte[]

the credentials to register

final @NonNull String

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

final @NonNull byte[]

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

final @NonNull String

the type of the credentials being registered

Constants

DISPLAY_TYPE_VERIFICATION

public static final int DISPLAY_TYPE_VERIFICATION = 0

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
public DigitalCredentialRegistry(
    @NonNull String id,
    @NonNull byte[] credentials,
    @NonNull byte[] matcher
)
Parameters
@NonNull String id

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

@NonNull byte[] credentials

the credentials in raw bytes

@NonNull byte[] matcher

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