# BeginGetPasswordOption

# BeginGetPasswordOption

Artifact:[androidx.credentials:credentials](https://developer.android.com/jetpack/androidx/releases/credentials)  
[View Source](https://cs.android.com/search?q=file:androidx/credentials/provider/BeginGetPasswordOption.kt+class:androidx.credentials.provider.BeginGetPasswordOption)  
Added in[1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/credentials/provider/BeginGetPasswordOption "View this page in Java")

<br />

```
class BeginGetPasswordOption : BeginGetCredentialOption
```

<br />

|---|---|-------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)                                                                                |||
| ↳ | [androidx.credentials.provider.BeginGetCredentialOption](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetCredentialOption) ||
|   | ↳ | [androidx.credentials.provider.BeginGetPasswordOption](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetPasswordOption) |

*** ** * ** ***

A request to a password provider to begin the flow of retrieving the user's saved passwords.

Providers must use the parameters in this option to retrieve the corresponding credentials' metadata, and then return them in the form of a list of[PasswordCredentialEntry](https://developer.android.com/reference/kotlin/androidx/credentials/provider/PasswordCredentialEntry)set on the[BeginGetCredentialResponse](https://developer.android.com/reference/android/service/credentials/BeginGetCredentialResponse.html).

Note : Credential providers are not expected to utilize the constructor in this class for any production flow. This constructor must only be used for testing purposes.

## Summary

|                                                                                                                                                                                                                                                                                              ### Public constructors                                                                                                                                                                                                                                                                                               |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [BeginGetPasswordOption](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetPasswordOption#BeginGetPasswordOption(kotlin.collections.Set,android.os.Bundle,kotlin.String))`(` ` allowedUserIds: `[Set](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html)`<`[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`>,` ` candidateQueryData: `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)`,` ` id: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) `)` |

|                                                                             ### Public properties                                                                              |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Set](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html)`<`[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`>` | [allowedUserIds](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetPasswordOption#allowedUserIds()) a optional set of user ids with which the credentials associated are requested; left as empty if the caller app wants to request all the available user credentials |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ### Inherited properties                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[androidx.credentials.provider.BeginGetCredentialOption](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetCredentialOption) |-----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Bundle](https://developer.android.com/reference/android/os/Bundle.html)          | [candidateQueryData](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetCredentialOption#candidateQueryData()) the parameters needed to retrieve the credentials, in the form of the raw[Bundle](https://developer.android.com/reference/android/os/Bundle.html)- can typically be ignored by the credential provider as the required properties are already parse into the structured subclasses                                                                    | | [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) | [id](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetCredentialOption#id()) unique id representing this particular option, to be used while constructing the[CredentialEntry](https://developer.android.com/reference/kotlin/androidx/credentials/provider/CredentialEntry)to be set on[BeginGetCredentialResponse](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetCredentialResponse)                                      | | [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) | [type](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetCredentialOption#type()) the type of the credential to be retrieved against this option, e.g. a[BeginGetPasswordOption](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetPasswordOption)will have type[PasswordCredential.TYPE_PASSWORD_CREDENTIAL](https://developer.android.com/reference/kotlin/androidx/credentials/PasswordCredential#TYPE_PASSWORD_CREDENTIAL()) | |

## Public constructors

### BeginGetPasswordOption

Added in[1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)  

```
BeginGetPasswordOption(
    allowedUserIds: Set<String>,
    candidateQueryData: Bundle,
    id: String
)
```  

## Public properties

### allowedUserIds

Added in[1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)  

```
val allowedUserIds: Set<String>
```

a optional set of user ids with which the credentials associated are requested; left as empty if the caller app wants to request all the available user credentials