CredentialRequest.Builder

public static final class CredentialRequest.Builder extends Object

Public Constructor Summary

Public Method Summary

CredentialRequest
build()
Builds a CredentialRequest.
CredentialRequest.Builder
setAccountTypes(String... accountTypes)
Sets the account types (identity providers) that are accepted by this application.
CredentialRequest.Builder
setCredentialHintPickerConfig(CredentialPickerConfig config)
Sets the configuration for credential hint picker.
CredentialRequest.Builder
setCredentialPickerConfig(CredentialPickerConfig config)
Sets the configuration for credential picker.
CredentialRequest.Builder
setIdTokenNonce(String idTokenNonce)
Specify a nonce value that should be included in any generated ID token for this request.
CredentialRequest.Builder
setIdTokenRequested(boolean idTokenRequested)
Specify whether an ID token should be acquired for retrieved credentials or hints, if available for the credential identifier.
CredentialRequest.Builder
setPasswordLoginSupported(boolean passwordLoginSupported)
Enables returning credentials with a password, that is verified by the application.
CredentialRequest.Builder
setServerClientId(String serverClientId)
Specify the server client ID for the backend associated with this app.
CredentialRequest.Builder
setSupportsPasswordLogin(boolean supportsPasswordLogin)
This method was deprecated. Use setPasswordLoginSupported(boolean).

Inherited Method Summary

Public Constructors

public CredentialRequest.Builder ()

Public Methods

public CredentialRequest build ()

Builds a CredentialRequest.

public CredentialRequest.Builder setAccountTypes (String... accountTypes)

Sets the account types (identity providers) that are accepted by this application. It is strongly recommended that the strings listed in IdentityProviders be used for the most common identity providers, and strings representing the login domain of the identity provider be used for any others which are not listed.

Parameters
accountTypes The list of account types (identity providers) supported by the app. typically in the form of the associated login domain for each identity provider.

public CredentialRequest.Builder setCredentialHintPickerConfig (CredentialPickerConfig config)

Sets the configuration for credential hint picker.

public CredentialRequest.Builder setCredentialPickerConfig (CredentialPickerConfig config)

Sets the configuration for credential picker.

public CredentialRequest.Builder setIdTokenNonce (String idTokenNonce)

Specify a nonce value that should be included in any generated ID token for this request.

public CredentialRequest.Builder setIdTokenRequested (boolean idTokenRequested)

Specify whether an ID token should be acquired for retrieved credentials or hints, if available for the credential identifier. This is disabled by default; enable this if your app can consume ID tokens as a more secure alternative to passwords.

public CredentialRequest.Builder setPasswordLoginSupported (boolean passwordLoginSupported)

Enables returning credentials with a password, that is verified by the application.

public CredentialRequest.Builder setServerClientId (String serverClientId)

Specify the server client ID for the backend associated with this app. If a Google ID token can be generated for a retrieved credential or hint, and the specified server client ID is correctly configured to be associated with the app, then it will be used as the audience of the generated token. If a null value is specified, the default audience will be used for the generated ID token.

public CredentialRequest.Builder setSupportsPasswordLogin (boolean supportsPasswordLogin)

This method was deprecated.
Use setPasswordLoginSupported(boolean).