From b8a69ae8acc81c8f6124d13b33dcc0f80a14289f Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 16 May 2019 12:38:01 -0700 Subject: [PATCH] Deprecate the GoogleCredential and CloudShellCredential classes --- .../client/googleapis/auth/oauth2/CloudShellCredential.java | 3 +++ .../api/client/googleapis/auth/oauth2/GoogleCredential.java | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/CloudShellCredential.java b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/CloudShellCredential.java index 9c6b3c665..692d210bc 100644 --- a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/CloudShellCredential.java +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/CloudShellCredential.java @@ -46,7 +46,10 @@ * OAuth2 credentials representing the built-in service account for Google Cloud Shell. * * @since 1.21.0 + * @deprecated Please use + * google-auth-library for handling authentication and authorization from Cloud Shell. */ +@Deprecated public class CloudShellCredential extends GoogleCredential { private static final int ACCESS_TOKEN_INDEX = 2; diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleCredential.java b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleCredential.java index a92749bca..bebd47a74 100644 --- a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleCredential.java +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleCredential.java @@ -164,7 +164,11 @@ public static GoogleCredential createCredentialForServiceAccountImpersonateUser( * * @since 1.7 * @author Yaniv Inbar + * @deprecated Please use + * google-auth-library for handling Application Default Credentials and other non-OAuth2 + * based authentication. */ +@Deprecated public class GoogleCredential extends Credential { static final String USER_FILE_TYPE = "authorized_user";