@@ -199,6 +199,13 @@ public static GoogleCredential getApplicationDefault(
199
199
* {@link Beta} <br>
200
200
* Return a credential defined by a Json file.
201
201
*
202
+ * <p>Important: If you accept a credential configuration (credential JSON/File/Stream) from an
203
+ * external source for authentication to Google Cloud Platform, you must validate it before
204
+ * providing it to any Google API or library. Providing an unvalidated credential configuration to
205
+ * Google APIs can compromise the security of your systems and data. For more information, refer
206
+ * to {@link <a
207
+ * href="https://cloud.google.com/docs/authentication/external/externally-sourced-credentials">documentation</a>}.
208
+ *
202
209
* @param credentialStream the stream with the credential definition.
203
210
* @return the credential defined by the credentialStream.
204
211
* @throws IOException if the credential cannot be created from the stream.
@@ -212,6 +219,13 @@ public static GoogleCredential fromStream(InputStream credentialStream) throws I
212
219
* {@link Beta} <br>
213
220
* Return a credential defined by a Json file.
214
221
*
222
+ * <p>Important: If you accept a credential configuration (credential JSON/File/Stream) from an
223
+ * external source for authentication to Google Cloud Platform, you must validate it before
224
+ * providing it to any Google API or library. Providing an unvalidated credential configuration to
225
+ * Google APIs can compromise the security of your systems and data. For more information, refer
226
+ * to {@link <a
227
+ * href="https://cloud.google.com/docs/authentication/external/externally-sourced-credentials">documentation</a>}.
228
+ *
215
229
* @param credentialStream the stream with the credential definition.
216
230
* @param transport the transport for Http calls.
217
231
* @param jsonFactory the factory for Json parsing and formatting.
0 commit comments