Class SqlCredentialFactory
java.lang.Object
com.google.cloud.spring.autoconfigure.sql.SqlCredentialFactory
- All Implemented Interfaces:
com.google.cloud.sql.CredentialFactory
Returns the credentials that are written to a system property by the Cloud SQL starter.
Since the sockets factory creates an instance of this class by reflection and without any arguments, the credential location must be in a place that this class knows without any context.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
the system property name for the key name.static final String
the system property name for the location of the credentials.Fields inherited from interface com.google.cloud.sql.CredentialFactory
CREDENTIAL_FACTORY_PROPERTY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.api.client.http.HttpRequestInitializer
create()
com.google.auth.oauth2.GoogleCredentials
-
Field Details
-
CREDENTIAL_LOCATION_PROPERTY_NAME
the system property name for the location of the credentials.- See Also:
-
CREDENTIAL_ENCODED_KEY_PROPERTY_NAME
the system property name for the key name.- See Also:
-
-
Constructor Details
-
SqlCredentialFactory
public SqlCredentialFactory()
-
-
Method Details
-
create
public com.google.api.client.http.HttpRequestInitializer create()- Specified by:
create
in interfacecom.google.cloud.sql.CredentialFactory
-
getCredentials
public com.google.auth.oauth2.GoogleCredentials getCredentials()- Specified by:
getCredentials
in interfacecom.google.cloud.sql.CredentialFactory
-