BeginGetPublicKeyCredentialOption


public final class BeginGetPublicKeyCredentialOption extends BeginGetCredentialOption


A request to begin the flow of getting passkeys from the user's public key credential provider.

Throws
kotlin.NullPointerException

If requestJson is null

kotlin.IllegalArgumentException

If requestJson is empty, or is not a valid JSON

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

BeginGetPublicKeyCredentialOption(
    @NonNull Bundle candidateQueryData,
    @NonNull String id,
    @NonNull String requestJson,
    byte[] clientDataHash
)

constructs an instance of BeginGetPublicKeyCredentialOption

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 in JSON format in the standard webauthn web json shown here

Inherited methods

From androidx.credentials.provider.BeginGetCredentialOption
final @NonNull Bundle

the parameters needed to retrieve the credentials, in the form of the raw Bundle - can typically be ignored by the credential provider as the required properties are already parse into the structured subclasses

final @NonNull String

unique id representing this particular option, to be used while constructing the CredentialEntry to be set on BeginGetCredentialResponse

final @NonNull String

the type of the credential to be retrieved against this option, e.g. a BeginGetPasswordOption will have type PasswordCredential.TYPE_PASSWORD_CREDENTIAL

Public constructors

BeginGetPublicKeyCredentialOption

Added in 1.2.0
public BeginGetPublicKeyCredentialOption(
    @NonNull Bundle candidateQueryData,
    @NonNull String id,
    @NonNull String requestJson,
    byte[] clientDataHash
)

constructs an instance of BeginGetPublicKeyCredentialOption

Parameters
@NonNull Bundle candidateQueryData

the request data in the Bundle format

@NonNull String id

the id of this request option

@NonNull String requestJson

the request in JSON format in the standard webauthn web json shown here

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 in JSON format in the standard webauthn web json shown here