LocalFileCredentialFactory

public class LocalFileCredentialFactory extends Object
implements CredentialFactory

Factory to create a GoogleCredential object for accessing the Cloud Search API.

Required configuration parameters:

  • api.serviceAccountPrivateKeyFile - Specifies the service account private key file path.

Optional configuration parameters:

  • api.serviceAccountId - Specifies the service account Id. If api.serviceAccountPrivateKeyFile is not a json key, then api.serviceAccountId is required.

Nested Class Summary

class LocalFileCredentialFactory.Builder  

Constant Summary

String SERVICE_ACCOUNT_ID_CONFIG
String SERVICE_ACCOUNT_KEY_FILE_CONFIG

Public Method Summary

static LocalFileCredentialFactory
GoogleCredential
getCredential(Collection<String> scopes)
Creates a GoogleCredential object for accessing the Cloud Search API.

Inherited Method Summary

Constants

public static final String SERVICE_ACCOUNT_ID_CONFIG

Constant Value: "api.serviceAccountId"

public static final String SERVICE_ACCOUNT_KEY_FILE_CONFIG

Constant Value: "api.serviceAccountPrivateKeyFile"

Public Methods

public static LocalFileCredentialFactory fromConfiguration ()

public GoogleCredential getCredential (Collection<String> scopes)

Creates a GoogleCredential object for accessing the Cloud Search API.

Parameters
scopes the OAuth 2.0 scope requirements to access the Cloud Search API
Returns
Throws
GeneralSecurityException
IOException

Send feedback about...

Cloud Search
Cloud Search