GetCredentialRequest
public
final
class
GetCredentialRequest
extends Object
implements
Parcelable
java.lang.Object | |
↳ | android.service.credentials.GetCredentialRequest |
Request for getting user's credential from a given credential provider.
A credential provider will receive this request once the user selects a
given CredentialEntry
, or RemoteEntry
on the selector, that was sourced
from provider's initial response to CredentialProviderService#onBeginGetCredential
.
Summary
Inherited constants |
---|
Fields | |
---|---|
public
static
final
Creator<GetCredentialRequest> |
CREATOR
|
Public constructors | |
---|---|
GetCredentialRequest(CallingAppInfo callingAppInfo, List<CredentialOption> credentialOptions)
|
Public methods | |
---|---|
int
|
describeContents()
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
CallingAppInfo
|
getCallingAppInfo()
Returns info pertaining to the app requesting credentials. |
List<CredentialOption>
|
getCredentialOptions()
Returns a list of options containing parameters needed to return a given type of credential. |
void
|
writeToParcel(Parcel dest, int flags)
Flatten this object in to a Parcel. |
Inherited methods | |
---|---|
Fields
Public constructors
GetCredentialRequest
public GetCredentialRequest (CallingAppInfo callingAppInfo, List<CredentialOption> credentialOptions)
Parameters | |
---|---|
callingAppInfo |
CallingAppInfo : This value cannot be null . |
credentialOptions |
List : This value cannot be null . |
Public methods
describeContents
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 CONTENTS_FILE_DESCRIPTOR |
getCallingAppInfo
public CallingAppInfo getCallingAppInfo ()
Returns info pertaining to the app requesting credentials.
Returns | |
---|---|
CallingAppInfo |
This value cannot be null . |
getCredentialOptions
public List<CredentialOption> getCredentialOptions ()
Returns a list of options containing parameters needed to return a given type of credential.
This is part of the request that the credential provider receives after the user has
selected an entry on a selector UI.
When the user selects a CredentialEntry
and the credential provider receives a
GetCredentialRequest
, this list is expected to contain a single
CredentialOption
only. A CredentialEntry
is always created for a given
BeginGetCredentialOption
, and hence when the user selects it, the provider
receives a corresponding CredentialOption
that contains all the required parameters
to actually retrieve the credential.
When the user selects a RemoteEntry
and the credential provider receives a
GetCredentialRequest
, this list may contain greater than a single
CredentialOption
, representing the number of options specified by the developer
in the original GetCredentialRequest
. This is because a
RemoteEntry
indicates that the entire request will be processed on a different
device and is not tied to a particular option.
Returns | |
---|---|
List<CredentialOption> |
This value cannot be null . |
writeToParcel
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 Parcelable.PARCELABLE_WRITE_RETURN_VALUE , and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |