RegisterCreationOptionsRequest


public 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(
    @NonNull String type,
    @NonNull String id,
    @NonNull byte[] creationOptions,
    @NonNull byte[] matcher,
    @NonNull String intentAction
)

Public methods

final @NonNull byte[]

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

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

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

final @NonNull String

the type of the credentials to be created being registered

Public constructors

RegisterCreationOptionsRequest

Added in 1.0.0-alpha04
public RegisterCreationOptionsRequest(
    @NonNull String type,
    @NonNull String id,
    @NonNull byte[] creationOptions,
    @NonNull byte[] matcher,
    @NonNull String intentAction
)

Public methods

getCreationOptions

Added in 1.0.0-alpha04
public final @NonNull byte[] getCreationOptions()

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

getId

Added in 1.0.0-alpha04
public final @NonNull String getId()

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

getIntentAction

Added in 1.0.0-alpha04
public final @NonNull String getIntentAction()

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

getMatcher

Added in 1.0.0-alpha04
public final @NonNull byte[] getMatcher()

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

getType

Added in 1.0.0-alpha04
public final @NonNull String getType()

the type of the credentials to be created being registered