From 98d7ac909f3a5cda0fb90088859cc3056193a708 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Wed, 25 Jan 2023 17:55:44 -0500 Subject: [PATCH] docs: adding deprecated annotation and guide for migration --- .../extensions/java6/auth/oauth2/GooglePromptReceiver.java | 4 ++++ .../googleapis/auth/oauth2/GoogleOAuthConstants.java | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/google-api-client-java6/src/main/java/com/google/api/client/googleapis/extensions/java6/auth/oauth2/GooglePromptReceiver.java b/google-api-client-java6/src/main/java/com/google/api/client/googleapis/extensions/java6/auth/oauth2/GooglePromptReceiver.java index 4e8e580c9..0fcc8e336 100644 --- a/google-api-client-java6/src/main/java/com/google/api/client/googleapis/extensions/java6/auth/oauth2/GooglePromptReceiver.java +++ b/google-api-client-java6/src/main/java/com/google/api/client/googleapis/extensions/java6/auth/oauth2/GooglePromptReceiver.java @@ -22,6 +22,10 @@ * Google OAuth 2.0 abstract verification code receiver that prompts user to paste the code copied * from the browser. * + *

This uses deprecated OAuth out-of-band (oob) flow. To migrate to an alternative flow, please + * refer to Making + * Google OAuth interactions safer by using more secure OAuth flows. + * *

Implementation is thread-safe. * * @since 1.11 diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleOAuthConstants.java b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleOAuthConstants.java index 4d780e8da..2e4ea5733 100644 --- a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleOAuthConstants.java +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleOAuthConstants.java @@ -44,8 +44,13 @@ public class GoogleOAuthConstants { * Redirect URI to use for an installed application as specified in Using OAuth 2.0 for * Mobile & Desktop Apps. + * + *

OAuth out-of-band (oob) flow has been deprecated. To migrate to an alternative flow, please + * refer to Making Google + * OAuth interactions safer by using more secure OAuth flows. */ - public static final String OOB_REDIRECT_URI = "urn:ietf:wg:oauth:2.0:oob"; + @Deprecated public static final String OOB_REDIRECT_URI = "urn:ietf:wg:oauth:2.0:oob"; private GoogleOAuthConstants() {} }