File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
oauth2_http/java/com/google/auth/oauth2 Expand file tree Collapse file tree 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
158158 * <p>The stream can contain a Service Account key file in JSON format from the Google Developers
159159 * Console or a stored user credential using the format supported by the Cloud SDK.
160160 *
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+ *
161168 * @param credentialsStream the stream with the credential definition.
162169 * @return the credential defined by the credentialsStream.
163170 * @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
154154 * Returns service account credentials defined by JSON using the format supported by the Google
155155 * Developers Console.
156156 *
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+ *
157164 * @param json a map from the JSON representing the credentials.
158165 * @param transportFactory HTTP transport factory, creates the transport used to get access
159166 * tokens.
You can’t perform that action at this time.
0 commit comments