# 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

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManagerProvider` | Provider interface to be implemented by a system registry manager service provider that will fulfill `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager` requests. |

## Classes

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/ClearCreationOptionsRequest` | A request to clear the creation options stored for your app, which were registered using the `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager#registerCreationOptions(androidx.credentials.registry.provider.RegisterCreationOptionsRequest)` API. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/ClearCreationOptionsRequest.PerTypeConfig` | Configures how to clear the creation options for a given type. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/ClearCreationOptionsResponse` | A response to a call to `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager#clearCreationOptions(androidx.credentials.registry.provider.ClearCreationOptionsRequest)`. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/ClearCredentialRegistryRequest` | A request to clear the credential registries stored for your app, which were registered using the `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager#registerCredentials(androidx.credentials.registry.provider.RegisterCredentialsRequest)` API. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/ClearCredentialRegistryRequest.PerTypeConfig` | Configures how to clear the registries for a given type. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/ClearCredentialRegistryResponse` | A result of clearing credential registries. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCreationOptionsRequest` | A request to register creation options with Credential Manager. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCreationOptionsResponse` | The result of calling `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager#registerCreationOptions(androidx.credentials.registry.provider.RegisterCreationOptionsRequest)`. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsRequest` | A request to register credentials with Credential Manager. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsResponse` | The result of calling `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager#registerCredentials(androidx.credentials.registry.provider.RegisterCredentialsRequest)`. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager` | APIs for managing credential registries that are registered with the Credential Manager. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/SelectedCredential` | A credential selected within a `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/SelectedCredentialSet`. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/SelectedCredentialSet` | Contains information about the user selection result on the Credential Manager UI. |

## Exceptions

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/ClearCreationOptionsConfigurationException` | During the `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager#clearCreationOptions(androidx.credentials.registry.provider.ClearCreationOptionsRequest)` 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. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/ClearCreationOptionsException` | Represents an error thrown during a `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager#clearCreationOptions(androidx.credentials.registry.provider.ClearCreationOptionsRequest)` transaction. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/ClearCreationOptionsUnknownException` | Thrown when the `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager#clearCreationOptions(androidx.credentials.registry.provider.ClearCreationOptionsRequest)` transaction fails with no more detailed information. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/ClearCredentialRegistryConfigurationException` | During the `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager#clearCredentialRegistry(androidx.credentials.registry.provider.ClearCredentialRegistryRequest)` 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. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/ClearCredentialRegistryException` | Represents an error thrown during a `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager#clearCredentialRegistry(androidx.credentials.registry.provider.ClearCredentialRegistryRequest)` transaction. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/ClearCredentialRegistryUnknownException` | Thrown when the `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager#clearCredentialRegistry(androidx.credentials.registry.provider.ClearCredentialRegistryRequest)` transaction fails with no more detailed information. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCreationOptionsConfigurationException` | During the `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager#registerCreationOptions(androidx.credentials.registry.provider.RegisterCreationOptionsRequest)` 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. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCreationOptionsException` | Represents an error thrown during a `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager#registerCreationOptions(androidx.credentials.registry.provider.RegisterCreationOptionsRequest)` transaction. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCreationOptionsUnknownException` | Thrown when the `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager#registerCreationOptions(androidx.credentials.registry.provider.RegisterCreationOptionsRequest)` transaction fails with no more detailed information. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsConfigurationException` | During the `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager#registerCredentials(androidx.credentials.registry.provider.RegisterCredentialsRequest)` 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. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsException` | Represents an error thrown during a `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager#registerCredentials(androidx.credentials.registry.provider.RegisterCredentialsRequest)` transaction. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsUnknownException` | Thrown when the `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager#registerCredentials(androidx.credentials.registry.provider.RegisterCredentialsRequest)` transaction fails with no more detailed information. |

## Extension properties summary

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/SelectedCredentialSet?` | `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderGetCredentialRequest.https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/package-summary#(androidx.credentials.provider.ProviderGetCredentialRequest).selectedCredentialSet()` Returns credential set selected by the user. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderCreateCredentialRequest.https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/package-summary#(androidx.credentials.provider.ProviderCreateCredentialRequest).selectedEntryId()` Returns the id of the entry selected by the user. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderGetCredentialRequest.https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/package-summary#(androidx.credentials.provider.ProviderGetCredentialRequest).selectedEntryId()` Returns the id of the entry selected by the user. |

## Extension properties

### ProviderGetCredentialRequest.selectedCredentialSet

Artifact: [androidx.credentials.registry:registry-provider](https://developer.android.com/jetpack/androidx/releases/credentials-registry) [View Source](https://cs.android.com/search?q=file:androidx/credentials/registry/provider/ProviderGetCredentialRequest.kt+symbol:selectedCredentialSet) Added in [1.0.0-alpha05](https://developer.android.com/jetpack/androidx/releases/credentials-registry#1.0.0-alpha05)

```
val ProviderGetCredentialRequest.selectedCredentialSet: SelectedCredentialSet?
```

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 `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager#registerCredentials(androidx.credentials.registry.provider.RegisterCredentialsRequest)` API.

For how to handle a user selection and extract the `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderGetCredentialRequest` containing the selection information, see `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager#ACTION_GET_CREDENTIAL()`.

### ProviderCreateCredentialRequest.selectedEntryId

Artifact: [androidx.credentials.registry:registry-provider](https://developer.android.com/jetpack/androidx/releases/credentials-registry) [View Source](https://cs.android.com/search?q=file:androidx/credentials/registry/provider/ProviderCreateCredentialRequest.kt+symbol:selectedEntryId) Added in [1.0.0-alpha05](https://developer.android.com/jetpack/androidx/releases/credentials-registry#1.0.0-alpha05)

```
val ProviderCreateCredentialRequest.selectedEntryId: String?
```

Returns the id of the entry selected by the user.

A null return means that entry ID isn't supported for the given type of the use case at all.

For how to handle a user selection and extract the `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderCreateCredentialRequest` containing the selection information, see `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager#ACTION_CREATE_CREDENTIAL()`.

### ProviderGetCredentialRequest.selectedEntryId

Artifact: [androidx.credentials.registry:registry-provider](https://developer.android.com/jetpack/androidx/releases/credentials-registry) [View Source](https://cs.android.com/search?q=file:androidx/credentials/registry/provider/ProviderGetCredentialRequest.kt+symbol:selectedEntryId) Added in [1.0.0-alpha05](https://developer.android.com/jetpack/androidx/releases/credentials-registry#1.0.0-alpha05)

```
val ProviderGetCredentialRequest.selectedEntryId: String?
```

Returns the id of the entry selected by the user. For example, for a digital credential entry, this maps to the corresponding entry's `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/digitalcredentials/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 `https://developer.android.com/reference/kotlin/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 `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderGetCredentialRequest` containing the selection information, see `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager#ACTION_GET_CREDENTIAL()`.