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
FieldsModifier and TypeFieldDescriptionstatic final Stringthe system property name for the key name.static final Stringthe system property name for the location of the credentials.Fields inherited from interface com.google.cloud.sql.CredentialFactory
CREDENTIAL_FACTORY_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.api.client.http.HttpRequestInitializercreate()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:
createin interfacecom.google.cloud.sql.CredentialFactory
-
getCredentials
public com.google.auth.oauth2.GoogleCredentials getCredentials()- Specified by:
getCredentialsin interfacecom.google.cloud.sql.CredentialFactory
-