androidx.credentials.registry.provider


Library that allows provider apps to register digital user credentials with CredentialManager to support smooth sign-in, verification, and other user experience

Interfaces

RegistryManagerProvider

Provider interface to be implemented by a system registry manager service provider that will fulfill RegistryManager requests.

Classes

ClearCredentialRegistryRequest

A request to clear the credential registries stored for your app, which were registered using the RegistryManager.registerCredentials API.

ClearCredentialRegistryRequest.PerTypeConfig

Configures how to clear the registries for a given type.

ClearCredentialRegistryResponse

A result of clearing credential registries.

RegisterCredentialsRequest

A request to register credentials with Credential Manager.

RegisterCredentialsResponse

The result of calling RegistryManager.registerCredentials.

RegistryManager

APIs for managing credential registries that are registered with the Credential Manager.

SelectedCredential

A credential selected within a SelectedCredentialSet.

SelectedCredentialSet

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

Exceptions

ClearCredentialRegistryConfigurationException

During the RegistryManager.clearCredentialRegistry transaction, this is thrown when configurations are mismatched for the RegistryManager service, typically indicating the service provider dependency is missing in the manifest or some system service is not enabled.

ClearCredentialRegistryException

Represents an error thrown during a RegistryManager.clearCredentialRegistry transaction.

ClearCredentialRegistryUnknownException

Thrown when the RegistryManager.clearCredentialRegistry transaction fails with no more detailed information.

RegisterCredentialsConfigurationException

During the RegistryManager.registerCredentials transaction, this is thrown when configurations are mismatched for the RegistryManager service, typically indicating the service provider dependency is missing in the manifest or some system service is not enabled.

RegisterCredentialsException

Represents an error thrown during a RegistryManager.registerCredentials transaction.

RegisterCredentialsUnknownException

Thrown when the RegistryManager.registerCredentials transaction fails with no more detailed information.

Extension properties summary

SelectedCredentialSet?

Returns credential set selected by the user.

String?

Returns the id of the entry selected by the user.

Extension properties

val ProviderGetCredentialRequest.selectedCredentialSetSelectedCredentialSet?

Returns credential set selected by the user.

A null return means that the credential user case isn't registry based. In other words, it means the credentials weren't registered through the RegistryManager.registerCredentials API.

For how to handle a user selection and extract the ProviderGetCredentialRequest containing the selection information, see RegistryManager.ACTION_GET_CREDENTIAL.

val ProviderGetCredentialRequest.selectedEntryIdString?

Returns the id of the entry selected by the user. For example, for a digital credential entry, this maps to the corresponding entry's DigitalCredentialEntry.id.

A null return means that entry ID isn't supported for the given type of the use case at all. For example, a androidx.credentials.provider.PasswordCredentialEntry does not have an id property and so this getter will return null if the selected entry was a password credential.

For how to handle a user selection and extract the ProviderGetCredentialRequest containing the selection information, see RegistryManager.ACTION_GET_CREDENTIAL.