public final class SelectedCredentialSet


Contains information about the user selection result on the Credential Manager UI.

During the androidx.credentials.CredentialManager.getCredential invocation, the user will be presented a Credential Manager selector & permission UI that displays the available credentials to choose from. The selector may display credential options in two dimensions. First, it may display a set of options; then each credential set can contain a list of credentials that must be all returned at once.

For example, the user could be presented options of { {cred1, cred2, cred3}, {cred1, cred4}, {cred5} } and may choose to use the {cred1, cred4} credential set. In that case, the selected provider will be invoked and be given a SelectedCredentialSet containing the corresponding setId and credentialIds for each individual credential in the set.

Throws
kotlin.IllegalArgumentException

if credentials is empty

Summary

Public constructors

SelectedCredentialSet(
    @NonNull String credentialSetId,
    @NonNull List<@NonNull SelectedCredential> credentials
)

Public methods

boolean
equals(Object other)
final @NonNull String

the id of the selected credential set; the credentialSetId is generated by the provider's matcher (see RegisterCredentialsRequest.matcher) and therefore its format is specific to the matcher

final @NonNull List<@NonNull SelectedCredential>

the non-empty list of credentials in this selected credential set; the provider must return all credentials to the caller

int

Public constructors

SelectedCredentialSet

Added in 1.0.0-alpha02
public SelectedCredentialSet(
    @NonNull String credentialSetId,
    @NonNull List<@NonNull SelectedCredential> credentials
)
Parameters
@NonNull String credentialSetId

the id of the selected credential set; the credentialSetId is generated by the provider's matcher (see RegisterCredentialsRequest.matcher) and therefore its format is specific to the matcher

@NonNull List<@NonNull SelectedCredential> credentials

the non-empty list of credentials in this selected credential set; the provider must return all credentials to the caller

Public methods

equals

public boolean equals(Object other)

getCredentialSetId

Added in 1.0.0-alpha02
public final @NonNull String getCredentialSetId()

the id of the selected credential set; the credentialSetId is generated by the provider's matcher (see RegisterCredentialsRequest.matcher) and therefore its format is specific to the matcher

getCredentials

Added in 1.0.0-alpha02
public final @NonNull List<@NonNull SelectedCredentialgetCredentials()

the non-empty list of credentials in this selected credential set; the provider must return all credentials to the caller

hashCode

public int hashCode()