DigitalCredential


@ExperimentalDigitalCredentialApi
public final class DigitalCredential extends Credential


Represents the user's digital credential, generally used for verification or sign-in purposes.

Summary

Constants

static final @NonNull String

The type value for public key credential related operations.

Public constructors

DigitalCredential(@NonNull String credentialJson)

Constructs a DigitalCredential.

Public methods

final @NonNull String

the digital credential in the JSON format; the latest format is defined at https://wicg.github.io/digital-credentials/#the-digitalcredential-interface

Inherited methods

From androidx.credentials.Credential
final @NonNull Bundle

the credential data in the Bundle format

final @NonNull String

the credential type determined by the credential-type-specific subclass (e.g. PasswordCredential.TYPE_PASSWORD_CREDENTIAL for PasswordCredential or PublicKeyCredential.TYPE_PUBLIC_KEY_CREDENTIAL for PublicKeyCredential)

Constants

TYPE_DIGITAL_CREDENTIAL

public static final @NonNull String TYPE_DIGITAL_CREDENTIAL

The type value for public key credential related operations.

Public constructors

DigitalCredential

Added in 1.5.0-alpha05
public DigitalCredential(@NonNull String credentialJson)

Constructs a DigitalCredential.

Parameters
@NonNull String credentialJson

the digital credential in the JSON format; the latest format is defined at https://wicg.github.io/digital-credentials/#the-digitalcredential-interface

Throws
kotlin.IllegalArgumentException

if the credentialJson is not a valid json

Public methods

getCredentialJson

Added in 1.5.0-alpha05
public final @NonNull String getCredentialJson()

the digital credential in the JSON format; the latest format is defined at https://wicg.github.io/digital-credentials/#the-digitalcredential-interface