A credential that can be used to authenticate a user, with additional user information
used to distinguish this credential from other available credentials. Credentials can be
constructed using Credential.Builder.
This is typically required when a credential is to be saved using
Auth.CredentialsApi.save() for future retrieval after a new account is created, or
the user changes their password.
| class | Credential.Builder | ||
| String | EXTRA_KEY | The key for Credential
values stored in a bundle or intent extra, typically in response to a resolution
intent from
request(GoogleApiClient, CredentialRequest). |
| public static final Creator<Credential> | CREATOR |
| boolean | |
| String |
getAccountType()
Returns the type of federated identity account used to sign in the user.
|
| String | |
| String | |
| String |
getId()
Returns the credential identifier.
|
| List<IdToken> |
getIdTokens()
Returns the ID tokens that assert the identity of the user, if available.
|
| String |
getName()
Returns the display name of the credential, if available.
|
| String |
getPassword()
Returns the password used to sign in the user.
|
| Uri |
getProfilePictureUri()
Returns the URL to an image of the user, if available.
|
| int |
hashCode()
|
| void |
writeToParcel(Parcel out, int
flags)
|
The key for Credential
values stored in a bundle or intent extra, typically in response to a resolution intent
from
request(GoogleApiClient, CredentialRequest).
Returns the type of federated identity account used to sign in the user. While this
may be any string, it is strongly recommended that values from
IdentityProviders are used, which are the login domains for common identity
providers.
null will be returned if the credential is a password credential.Returns the credential identifier. Typically this will be an email address, user name or phone number, though it may also be some encoded unique identifier for a federated identity account. Phone number identifiers will be normalized to the E.164 standard.
Returns the ID tokens that assert the identity of the user, if available. ID tokens provide a secure mechanism to verify that the user owns the identity asserted by the credential.
This is useful for account hints, where the ID token can replace the need to separately verify that the user owns their claimed email address - with a valid ID token, it is not necessary to send an account activation link to the address, simplifying the account creation process for the user.
A signed ID token is returned automatically for credential hints when the credential ID is a Google account that is authenticated on the device. This ID token can be sent along with your application's account creation operation, where the signature can be verified.
Returns the display name of the credential, if available. Typically, the display name will be the name of the user, or some other string which the user can easily recognize and distinguish from other accounts they may have.
Returns the password used to sign in the user.
Returns the URL to an image of the user, if available.