A client for the Credential Saving API.
The Credential Saving APIs can be used to save credentials. The only type of credential that is currently supported by this API is a pair of username/password.
The Credential Saving APIs guide the user through the Google account selection before saving a credential. The recommended process for saving a credential using this API is as follows:
- Get a new API client instance by calling
Identity.getCredentialSavingClient
. - Call
CredentialSavingClient.savePassword
, supplying the constructedSavePasswordRequest
as an input. - If the request is successful, launch the
PendingIntent
from theresult
of the operation to display the UI that guides the user through the flow of saving password. The success or failure result will be returned inActivity.onActivityResult
.
Public Method Summary
abstract Task<SavePasswordResult> |
savePassword(SavePasswordRequest
savePasswordRequest)
Initiates the storage of a password-backed credential that can later be used to
sign a user in.
|
Inherited Method Summary
Public Methods
public abstract Task<SavePasswordResult> savePassword (SavePasswordRequest savePasswordRequest)
Initiates the storage of a password-backed credential that can later be used to sign a user in.
If the request cannot be honored, an exception will be set on the returned
Task
. In all
other cases, a SavePasswordResult
will be returned.
Parameters
savePasswordRequest | container for the SignInPassword
for the password-saving flow |
---|
Returns
Task
which eventually contains the result of the initialization