Commit 6077709 1 parent 959f2e5 commit 6077709 Copy full SHA for 6077709
File tree 2 files changed +14
-0
lines changed
oauth2_http/java/com/google/auth/oauth2
2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,13 @@ public static GoogleCredentials getApplicationDefault(HttpTransportFactory trans
158
158
* <p>The stream can contain a Service Account key file in JSON format from the Google Developers
159
159
* Console or a stored user credential using the format supported by the Cloud SDK.
160
160
*
161
+ * <p>Important: If you accept a credential configuration (credential JSON/File/Stream) from an
162
+ * external source for authentication to Google Cloud Platform, you must validate it before
163
+ * providing it to any Google API or library. Providing an unvalidated credential configuration to
164
+ * Google APIs can compromise the security of your systems and data. For more information, refer
165
+ * to {@link <a
166
+ * href="https://cloud.google.com/docs/authentication/external/externally-sourced-credentials">documentation</a>}.
167
+ *
161
168
* @param credentialsStream the stream with the credential definition.
162
169
* @return the credential defined by the credentialsStream.
163
170
* @throws IOException if the credential cannot be created from the stream.
Original file line number Diff line number Diff line change @@ -154,6 +154,13 @@ public class ServiceAccountCredentials extends GoogleCredentials
154
154
* Returns service account credentials defined by JSON using the format supported by the Google
155
155
* Developers Console.
156
156
*
157
+ * <p>Important: If you accept a credential configuration (credential JSON/File/Stream) from an
158
+ * external source for authentication to Google Cloud Platform, you must validate it before
159
+ * providing it to any Google API or library. Providing an unvalidated credential configuration to
160
+ * Google APIs can compromise the security of your systems and data. For more information, refer
161
+ * to {@link <a
162
+ * href="https://cloud.google.com/docs/authentication/external/externally-sourced-credentials">documentation</a>}.
163
+ *
157
164
* @param json a map from the JSON representing the credentials.
158
165
* @param transportFactory HTTP transport factory, creates the transport used to get access
159
166
* tokens.
You can’t perform that action at this time.
0 commit comments