public
final
class
CredentialOption
extends Object
implements
Parcelable
Information about a specific type of credential to be requested during a CredentialManager.getCredential operation.
Summary
Nested classes | |
|---|---|
class |
CredentialOption.Builder
A builder for |
Constants | |
|---|---|
String |
SUPPORTED_ELEMENT_KEYS
Bundle key to the list of elements keys supported/requested. |
Inherited constants | ||||
|---|---|---|---|---|
|
From interface
|
Fields | |
|---|---|
public
static
final
Creator<CredentialOption> |
CREATOR
|
Public methods | |
|---|---|
int
|
describeContents()
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
Set<ComponentName>
|
getAllowedProviders()
Returns the set of |
Bundle
|
getCandidateQueryData()
Returns the partial request data that will be sent to the provider during the initial credential candidate query stage. |
Bundle
|
getCredentialRetrievalData()
Returns the full request data. |
String
|
getType()
Returns the requested credential type. |
boolean
|
isSystemProviderRequired()
Returns true if the request must only be fulfilled by a system provider, and false otherwise. |
String
|
toString()
Returns a string representation of the object. |
void
|
writeToParcel(Parcel dest, int flags)
Flatten this object in to a Parcel. |
Inherited methods | |||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
From class
| |||||||||||||||||||||||
|
From interface
| |||||||||||||||||||||||
Constants
SUPPORTED_ELEMENT_KEYS
Added in API level 34
public static final String SUPPORTED_ELEMENT_KEYS
Bundle key to the list of elements keys supported/requested. Framework will use this key to determine which types of Credentials will utilize Credential Registry when filtering Credential Providers to ping.
Constant Value: "android.credentials.GetCredentialOption.SUPPORTED_ELEMENT_KEYS"
Fields
Public methods
describeContents
Added in API level 34
public int describeContents ()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of writeToParcel(android.os.Parcel, int),
the return value of this method must include the
CONTENTS_FILE_DESCRIPTOR bit.
| Returns | |
|---|---|
int |
a bitmask indicating the set of special object types marshaled
by this Parcelable object instance.
Value is either 0 or
|
getAllowedProviders
Added in API level 34
public Set<ComponentName> getAllowedProviders ()
Returns the set of ComponentName corresponding to providers that must receive
this option.
| Returns | |
|---|---|
Set<ComponentName> |
This value cannot be null. |
getCandidateQueryData
Added in API level 34
public Bundle getCandidateQueryData ()
Returns the partial request data that will be sent to the provider during the initial
credential candidate query stage.
For security reason, a provider will receive the request data in two stages. First it gets
this partial request that do not contain sensitive user information; it uses this
information to provide credential candidates that the [@code CredentialManager] will show to
the user. Next, the full request data, getCredentialRetrievalData(), will be sent to
a provider only if the user further grants the consent by choosing a candidate from the
provider.
| Returns | |
|---|---|
Bundle |
This value cannot be null. |
getCredentialRetrievalData
Added in API level 34
public Bundle getCredentialRetrievalData ()
Returns the full request data.
| Returns | |
|---|---|
Bundle |
This value cannot be null. |
getType
Added in API level 34
public String getType ()
Returns the requested credential type.
| Returns | |
|---|---|
String |
This value cannot be null. |
isSystemProviderRequired
Added in API level 34
public boolean isSystemProviderRequired ()
Returns true if the request must only be fulfilled by a system provider, and false otherwise.
| Returns | |
|---|---|
boolean |
|
toString
Added in API level 34
public String toString ()
Returns a string representation of the object.
| Returns | |
|---|---|
String |
a string representation of the object. |
writeToParcel
Added in API level 34
public void writeToParcel (Parcel dest, int flags)
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
dest |
Parcel: This value cannot be null. |
flags |
int: Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE.
Value is either 0 or a combination of the following:
|