RegisterCreationOptionsRequest


abstract class RegisterCreationOptionsRequest


A request to register creation options with Credential Manager.

Throws
kotlin.IllegalArgumentException

if id or intentAction length is greater than 64 characters

Summary

Public constructors

RegisterCreationOptionsRequest(
    type: String,
    id: String,
    creationOptions: ByteArray,
    matcher: ByteArray,
    intentAction: String
)

Public properties

ByteArray

the data to be stored in the registry, later to be passed to the matcher.

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 your app was chosen by the user to create the given credential, default to RegistryManager.ACTION_CREATE_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 entries given the creationOptions and the request; an invalid matcher (e.g. one that fails wasm interpretation or causes exceptions) will mean that your application will never be surfaced to the user during creation

String

the type of the credentials to be created being registered

Public constructors

RegisterCreationOptionsRequest

Added in 1.0.0-alpha04
RegisterCreationOptionsRequest(
    type: String,
    id: String,
    creationOptions: ByteArray,
    matcher: ByteArray,
    intentAction: String = RegistryManager.ACTION_CREATE_CREDENTIAL
)

Public properties

creationOptions

Added in 1.0.0-alpha04
val creationOptionsByteArray

the data to be stored in the registry, later to be passed to the matcher.

id

Added in 1.0.0-alpha04
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-alpha04
val intentActionString

the intent action that will be used to launch your fulfillment activity when your app was chosen by the user to create the given credential, default to RegistryManager.ACTION_CREATE_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-alpha04
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 entries given the creationOptions and the request; an invalid matcher (e.g. one that fails wasm interpretation or causes exceptions) will mean that your application will never be surfaced to the user during creation

type

Added in 1.0.0-alpha04
val typeString

the type of the credentials to be created being registered