ProviderGetCredentialRequest


class ProviderGetCredentialRequest


Request received by the provider after the query phase of the get flow is complete i.e. the user was presented with a list of credentials, and the user has now made a selection from the list of CredentialEntry presented on the selector UI.

This request will be added to the intent extras of the activity invoked by the PendingIntent set on the CredentialEntry that the user selected. The request must be extracted using the PendingIntentHandler.retrieveProviderGetCredentialRequest helper API.

Summary

Public companion functions

Bundle

Helper method to convert the given request to a parcelable Bundle, in case the instance needs to be sent across a process.

ProviderGetCredentialRequest
fromBundle(bundle: Bundle)

Helper method to convert a Bundle retrieved through asBundle, back to an instance of ProviderGetCredentialRequest.

Public constructors

ProviderGetCredentialRequest(
    credentialOptions: List<CredentialOption>,
    callingAppInfo: CallingAppInfo,
    biometricPromptResult: BiometricPromptResult?
)

constructs an instance of ProviderGetCredentialRequest

Public properties

BiometricPromptResult?

the result of a Biometric Prompt authentication flow, that is propagated to the provider if the provider requested for androidx.credentials.CredentialManager to handle the authentication flow

CallingAppInfo

information pertaining to the calling application

List<CredentialOption>

the list of credential retrieval options containing the required parameters, expected to contain a single CredentialOption when this request is retrieved from the android.app.Activity invoked by the android.app.PendingIntent set on a PasswordCredentialEntry or a PublicKeyCredentialEntry, or expected to contain multiple CredentialOption when this request is retrieved from the android.app.Activity invoked by the android.app.PendingIntent set on a RemoteEntry

Public companion functions

asBundle

Added in 1.5.0-alpha05
fun asBundle(request: ProviderGetCredentialRequest): Bundle

Helper method to convert the given request to a parcelable Bundle, in case the instance needs to be sent across a process. Consumers of this method should use fromBundle to reconstruct the class instance back from the bundle returned here.

fromBundle

Added in 1.5.0-alpha05
fun fromBundle(bundle: Bundle): ProviderGetCredentialRequest

Helper method to convert a Bundle retrieved through asBundle, back to an instance of ProviderGetCredentialRequest.

Throws IllegalArgumentException if the conversion fails. This means that the given bundle does not contain a ProviderGetCredentialRequest. The bundle should be constructed and retrieved from asBundle itself and never be created from scratch to avoid the failure.

Public constructors

ProviderGetCredentialRequest

ProviderGetCredentialRequest(
    credentialOptions: List<CredentialOption>,
    callingAppInfo: CallingAppInfo,
    biometricPromptResult: BiometricPromptResult? = null
)

constructs an instance of ProviderGetCredentialRequest

Public properties

biometricPromptResult

Added in 1.5.0-alpha05
val biometricPromptResultBiometricPromptResult?

the result of a Biometric Prompt authentication flow, that is propagated to the provider if the provider requested for androidx.credentials.CredentialManager to handle the authentication flow

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.

callingAppInfo

Added in 1.2.0
val callingAppInfoCallingAppInfo

information pertaining to the calling application

credentialOptions

Added in 1.2.0
val credentialOptionsList<CredentialOption>

the list of credential retrieval options containing the required parameters, expected to contain a single CredentialOption when this request is retrieved from the android.app.Activity invoked by the android.app.PendingIntent set on a PasswordCredentialEntry or a PublicKeyCredentialEntry, or expected to contain multiple CredentialOption when this request is retrieved from the android.app.Activity invoked by the android.app.PendingIntent set on a RemoteEntry