BeginCreatePublicKeyCredentialRequest


public final class BeginCreatePublicKeyCredentialRequest extends BeginCreateCredentialRequest


Request to begin registering a public key credential.

This request will not contain all parameters needed to create the public key. Provider must use the initial parameters to determine if the public key can be created, and return a BeginCreateCredentialResponse containing a list of CreateEntry, denoting the accounts/groups where the public key can be registered. When user selects one of the returned CreateEntry, the corresponding PendingIntent set on the CreateEntry will be fired. The Intent invoked through the PendingIntent will contain the complete CreatePublicKeyCredentialRequest. This request will contain all required parameters to actually register a public key.

See also
BeginCreateCredentialRequest

Note: Credential providers are not expected to utilize the constructor in this class for any production flow. This constructor must only be used for testing purposes.

Summary

Public constructors

BeginCreatePublicKeyCredentialRequest(
    @NonNull String requestJson,
    CallingAppInfo callingAppInfo,
    @NonNull Bundle candidateQueryData,
    byte[] clientDataHash
)

constructs an instance of BeginCreatePublicKeyCredentialRequest

Public methods

final byte[]

a hash that is used to verify the relying party identity, set only if android.service.credentials.CallingAppInfo.getOrigin is set

final @NonNull String

the request json to be used for registering the public key credential

Public constructors

BeginCreatePublicKeyCredentialRequest

Added in 1.2.0
public BeginCreatePublicKeyCredentialRequest(
    @NonNull String requestJson,
    CallingAppInfo callingAppInfo,
    @NonNull Bundle candidateQueryData,
    byte[] clientDataHash
)

constructs an instance of BeginCreatePublicKeyCredentialRequest

Parameters
@NonNull String requestJson

the request json to be used for registering the public key credential

CallingAppInfo callingAppInfo

the information pertaining to the app requesting for credentials

@NonNull Bundle candidateQueryData

the raw bundle containing the request parameters, not expected to be used directly as all basic parameters are parsed into structured properties in this class like requestJson and clientDataHash

byte[] clientDataHash

a hash that is used to verify the relying party identity, set only if android.service.credentials.CallingAppInfo.getOrigin is set

Public methods

getClientDataHash

Added in 1.2.0
public final byte[] getClientDataHash()

a hash that is used to verify the relying party identity, set only if android.service.credentials.CallingAppInfo.getOrigin is set

getRequestJson

Added in 1.2.0
public final @NonNull String getRequestJson()

the request json to be used for registering the public key credential