RegisterCredentialsRequest


abstract class RegisterCredentialsRequest

Known direct subclasses
DigitalCredentialRegistry

A request to register digital credentials with Credential Manager.

Known indirect subclasses
OpenId4VpRegistry

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

PreviewRegistry

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


A request to register credentials with Credential Manager.

Throws
kotlin.IllegalArgumentException

if id or intentAction length is greater than 64 characters

Summary

Public constructors

RegisterCredentialsRequest(
    type: String,
    id: String,
    credentials: ByteArray,
    matcher: ByteArray,
    intentAction: String
)

Public properties

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

Public constructors

RegisterCredentialsRequest

Added in 1.0.0-alpha02
RegisterCredentialsRequest(
    type: String,
    id: String,
    credentials: ByteArray,
    matcher: ByteArray,
    intentAction: String = RegistryManager.ACTION_GET_CREDENTIAL
)

Public properties

credentials

Added in 1.0.0-alpha02
val credentialsByteArray

the credentials to register

id

Added in 1.0.0-alpha02
val idString

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

intentAction

Added in 1.0.0-alpha02
val intentActionString

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

matcher

Added in 1.0.0-alpha02
val matcherByteArray

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

type

Added in 1.0.0-alpha02
val typeString

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