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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.cloud.sql.CredentialFactory
getCredentials
-
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.auth.oauth2.Credential create()- Specified by:
create
in interfacecom.google.cloud.sql.CredentialFactory
-