Interface CredentialFactory (1.14.1)

public interface CredentialFactory

Factory for creating Credentials for interaction with Cloud SQL Admin API.

Static Fields

CREDENTIAL_FACTORY_PROPERTY

public static final String CREDENTIAL_FACTORY_PROPERTY

Name of system property that can specify an alternative credential factory.

Field Value
TypeDescription
String

Methods

create()

public abstract HttpRequestInitializer create()
Returns
TypeDescription
com.google.api.client.http.HttpRequestInitializer

getCredentials()

public default GoogleCredentials getCredentials()

Returns a GoogleCredentials to use for generating tokens and authenticating web requests. The default implementation will attempt to extract the GoogleCredentials object from known credential HttpRequestInitializer implementations already in used to provide tokens for IAM Authentication.

Returns
TypeDescription
com.google.auth.oauth2.GoogleCredentials