GetCredentialResponse


public final class GetCredentialResponse


Encapsulates the result of a user credential request.

Typically, a response contains a single user credential in credential (such as a passkey or a password). However, for DigitalCredentials, a single request may yield multiple credentials returned in credentials.

Summary

Public constructors

Constructs a GetCredentialResponse containing a single credential.

Public methods

final @NonNull Credential

The user credential that can be used to authenticate to your app.

final @NonNull List<@NonNull Credential>

the list of user credentials returned by the provider(s) that can be used to authenticate to your app

Public constructors

GetCredentialResponse

Added in 1.2.0
public GetCredentialResponse(@NonNull Credential credential)

Constructs a GetCredentialResponse containing a single credential.

Parameters
@NonNull Credential credential

the user credential that can be used to authenticate to your app

Throws
NullPointerException

If credential is null

GetCredentialResponse

public GetCredentialResponse(@NonNull List<@NonNull Credential> credentials)

Public methods

getCredential

Added in 1.2.0
public final @NonNull Credential getCredential()

The user credential that can be used to authenticate to your app.

When multiple credentials are returned in credentials, this returns the first credential.

getCredentials

Added in 1.7.0-alpha03
public final @NonNull List<@NonNull CredentialgetCredentials()

the list of user credentials returned by the provider(s) that can be used to authenticate to your app