From bb494ee28f806570e2de81f3e76678137512fab3 Mon Sep 17 00:00:00 2001 From: Mike Eltsufin Date: Thu, 26 Jan 2023 10:41:18 -0500 Subject: [PATCH] feat: remove deprecated OOB flow (#2242) Also remove `google-api-client-java6` module which is empty after removal of `GooglePromptReceiver.java`. --- docs/component-modules.md | 6 -- google-api-client-assembly/classpath-include | 1 - google-api-client-assembly/pom.xml | 4 - google-api-client-bom/pom.xml | 5 - google-api-client-java6/pom.xml | 96 ------------------- .../auth/oauth2/GooglePromptReceiver.java | 41 -------- .../java6/auth/oauth2/package-info.java | 21 ---- .../auth/oauth2/GoogleOAuthConstants.java | 12 --- pom.xml | 10 -- 9 files changed, 196 deletions(-) delete mode 100644 google-api-client-java6/pom.xml delete mode 100644 google-api-client-java6/src/main/java/com/google/api/client/googleapis/extensions/java6/auth/oauth2/GooglePromptReceiver.java delete mode 100644 google-api-client-java6/src/main/java/com/google/api/client/googleapis/extensions/java6/auth/oauth2/package-info.java diff --git a/docs/component-modules.md b/docs/component-modules.md index 264788217..7277febc0 100644 --- a/docs/component-modules.md +++ b/docs/component-modules.md @@ -43,12 +43,6 @@ Jackson2 extensions to the Google API Client Library for Java (`google-api-client-jackson2`). This module depends on `google-api-client` and `google-http-client-jackson2`. -## google-api-client-java6 - -Java 6 (and higher) extensions to the Google API Client Library for Java -(`google-api-client-java6`). This module depends on `google-api-client` and -`google-oauth-client-java6`. - ## google-api-client-protobuf [Protocol buffer][protobuf] extensions to the Google API Client Library for Java diff --git a/google-api-client-assembly/classpath-include b/google-api-client-assembly/classpath-include index c6e53b922..7753e19a6 100644 --- a/google-api-client-assembly/classpath-include +++ b/google-api-client-assembly/classpath-include @@ -3,7 +3,6 @@ - diff --git a/google-api-client-assembly/pom.xml b/google-api-client-assembly/pom.xml index 34eebca7c..b9db66a92 100644 --- a/google-api-client-assembly/pom.xml +++ b/google-api-client-assembly/pom.xml @@ -37,10 +37,6 @@ com.google.api-client google-api-client-jackson2 - - com.google.api-client - google-api-client-java6 - com.google.api-client google-api-client-protobuf diff --git a/google-api-client-bom/pom.xml b/google-api-client-bom/pom.xml index e0da65af9..d225f0864 100644 --- a/google-api-client-bom/pom.xml +++ b/google-api-client-bom/pom.xml @@ -91,11 +91,6 @@ google-api-client-jackson2 2.1.5-SNAPSHOT - - com.google.api-client - google-api-client-java6 - 2.1.5-SNAPSHOT - com.google.api-client google-api-client-protobuf diff --git a/google-api-client-java6/pom.xml b/google-api-client-java6/pom.xml deleted file mode 100644 index 72aa64920..000000000 --- a/google-api-client-java6/pom.xml +++ /dev/null @@ -1,96 +0,0 @@ - - 4.0.0 - - com.google.api-client - google-api-client-parent - 2.1.5-SNAPSHOT - ../pom.xml - - google-api-client-java6 - Java 6 (and higher) Extensions to the Google API Client Library for Java. - - - - maven-javadoc-plugin - - - http://download.oracle.com/javase/7/docs/api/ - https://googleapis.dev/java/google-http-client/${project.http.version}/ - - ${project.name} ${project.version} - ${project.artifactId} ${project.version} - - - - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - true - - - google.api.client.java6 - - - - - - org.apache.felix - maven-bundle-plugin - 5.1.8 - - - bundle-manifest - process-classes - - manifest - - - - - - https://googleapis.dev/java/google-api-client/${project.version}/index.html - Java 6 extensions to the Google APIs Client Library for Java - com.google.api.client.java6 - - - - - maven-source-plugin - - - source-jar - compile - - jar - - - - - - - org.codehaus.mojo - animal-sniffer-maven-plugin - - - org.codehaus.mojo.signature - java17 - 1.0 - - - - - - - - com.google.api-client - google-api-client - - - com.google.oauth-client - google-oauth-client-java6 - - - 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 deleted file mode 100644 index 0fcc8e336..000000000 --- a/google-api-client-java6/src/main/java/com/google/api/client/googleapis/extensions/java6/auth/oauth2/GooglePromptReceiver.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2012 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ - -package com.google.api.client.googleapis.extensions.java6.auth.oauth2; - -import com.google.api.client.extensions.java6.auth.oauth2.AbstractPromptReceiver; -import com.google.api.client.googleapis.auth.oauth2.GoogleOAuthConstants; -import java.io.IOException; - -/** - * 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 - * @author Yaniv Inbar - */ -@Deprecated -public class GooglePromptReceiver extends AbstractPromptReceiver { - - @Override - public String getRedirectUri() throws IOException { - return GoogleOAuthConstants.OOB_REDIRECT_URI; - } -} diff --git a/google-api-client-java6/src/main/java/com/google/api/client/googleapis/extensions/java6/auth/oauth2/package-info.java b/google-api-client-java6/src/main/java/com/google/api/client/googleapis/extensions/java6/auth/oauth2/package-info.java deleted file mode 100644 index a07b65a90..000000000 --- a/google-api-client-java6/src/main/java/com/google/api/client/googleapis/extensions/java6/auth/oauth2/package-info.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2012 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ - -/** - * Google OAuth 2.0 utilities that help simplify the authorization flow on Java 6. - * - * @since 1.11 - * @author Yaniv Inbar - */ -package com.google.api.client.googleapis.extensions.java6.auth.oauth2; 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 2e4ea5733..809c96dda 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 @@ -40,17 +40,5 @@ public class GoogleOAuthConstants { public static final String DEFAULT_PUBLIC_CERTS_ENCODED_URL = "https://www.googleapis.com/oauth2/v1/certs"; - /** - * 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. - */ - @Deprecated public static final String OOB_REDIRECT_URI = "urn:ietf:wg:oauth:2.0:oob"; - private GoogleOAuthConstants() {} } diff --git a/pom.xml b/pom.xml index 2df3abfa3..cd0292910 100644 --- a/pom.xml +++ b/pom.xml @@ -78,7 +78,6 @@ google-api-client-bom google-api-client-gson google-api-client-jackson2 - google-api-client-java6 google-api-client-protobuf google-api-client-xml @@ -178,11 +177,6 @@ google-api-client-android ${project.version} - - com.google.api-client - google-api-client-java6 - ${project.version} - com.google.api-client google-api-client-gson @@ -410,10 +404,6 @@ google-api-client-jackson2 com.google.api.client.googleapis.notifications.json.jackson2.* - - google-api-client-java6 - com.google.api.client.googleapis.extensions.java6.* - google-api-client-protobuf com.google.api.client.googleapis.services.protobuf*:com.google.api.client.googleapis.testing.services.protobuf*