CredentialEntry
abstract class CredentialEntry
CustomCredentialEntry |
Custom credential entry for a custom credential type that is displayed on the account selector UI. |
PasswordCredentialEntry |
A password credential entry that is displayed on the account selector UI. |
PublicKeyCredentialEntry |
A public key credential entry that is displayed on the account selector UI. |
Base class for a credential entry to be displayed on the selector.
The entryGroupId allows the credential selector display to, in the case of multiple entries across providers that have the same entryGroupId value, trim down to a single, most recently used provider on the primary card, meant for quick authentication. This will also be used for entry grouping display logic. However, if the user desires, it is possible to expand back the entries and select the provider of their choice. This should be something directly linked to the credential (e.g. PublicKeyCredentialEntry and PasswordCredentialEntry utilize 'username'), and should allow variance only as far as the case of letters (i.e. Foo@gmail.com and foo@gmail.com). These guidelines should be followed in cases where CustomCredentialEntry are created.
(RestrictTo property) type the type of the credential associated with this entry, e.g. a BeginGetPasswordOption will have type TYPE_PASSWORD_CREDENTIAL
Summary
Public companion functions |
|
|---|---|
CredentialEntry? |
fromCredentialEntry(credentialEntry: CredentialEntry)Converts a framework |
Public properties |
|
|---|---|
CharSequence? |
the user visible affiliated domain, a CharSequence representation of a web domain or an app package name that the given credential in this entry is associated with when it is different from the requesting entity, default null |
BeginGetCredentialOption |
the option from the original |
BiometricPromptData? |
the data that is set optionally to utilize a credential manager flow that directly handles the biometric verification and presents back the response; set to null by default, so if not opted in, the embedded biometric prompt flow will not show |
CharSequence |
an ID used for deduplication or to group entries during display |
Boolean |
when set to true, the UI prefers to render the default credential type icon when you are the only available provider; see individual subclasses for these default icons (e.g. for |
Public companion functions
fromCredentialEntry
fun fromCredentialEntry(credentialEntry: CredentialEntry): CredentialEntry?
Converts a framework android.service.credentials.CredentialEntry class to a Jetpack CredentialEntry class
Note that this API is not needed in a general credential retrieval flow that is implemented using this jetpack library, where you are only required to construct an instance of CredentialEntry to populate the BeginGetCredentialResponse.
| Parameters | |
|---|---|
credentialEntry: CredentialEntry |
the instance of framework class to be converted |
Public properties
affiliatedDomain
val affiliatedDomain: CharSequence?
the user visible affiliated domain, a CharSequence representation of a web domain or an app package name that the given credential in this entry is associated with when it is different from the requesting entity, default null
beginGetCredentialOption
val beginGetCredentialOption: BeginGetCredentialOption
the option from the original BeginGetCredentialRequest, for which this credential entry is being added
biometricPromptData
val biometricPromptData: BiometricPromptData?
the data that is set optionally to utilize a credential manager flow that directly handles the biometric verification and presents back the response; set to null by default, so if not opted in, the embedded biometric prompt flow will not show
entryGroupId
val entryGroupId: CharSequence
an ID used for deduplication or to group entries during display
isDefaultIconPreferredAsSingleProvider
val isDefaultIconPreferredAsSingleProvider: Boolean
when set to true, the UI prefers to render the default credential type icon when you are the only available provider; see individual subclasses for these default icons (e.g. for PublicKeyCredentialEntry, it is based on R.drawable.adx_ic_password)