From fd1c364a149ae1cdb7d406a72aa2a2e605cae1a9 Mon Sep 17 00:00:00 2001 From: Lai Jiang Date: Tue, 18 Jun 2019 15:55:33 -0400 Subject: [PATCH] Remove unnecessary provider method (#113) * Remove unnecessary provide method This provider is not used. Instead, depending on if the login is performed on [a remote machine or not](https://github.com/google/nomulus/blob/8bdc77501fcbb4053bf7742ac112b3a0551b44e0/core/src/main/java/google/registry/tools/LoginCommand.java#L43), the instance is created directly in the command. * Remove unused imports --- core/src/main/java/google/registry/tools/AuthModule.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/core/src/main/java/google/registry/tools/AuthModule.java b/core/src/main/java/google/registry/tools/AuthModule.java index 88b90dcb7..8dbbbdba7 100644 --- a/core/src/main/java/google/registry/tools/AuthModule.java +++ b/core/src/main/java/google/registry/tools/AuthModule.java @@ -17,8 +17,6 @@ package google.registry.tools; import static java.nio.charset.StandardCharsets.UTF_8; import com.google.api.client.auth.oauth2.Credential; -import com.google.api.client.extensions.java6.auth.oauth2.AuthorizationCodeInstalledApp; -import com.google.api.client.extensions.jetty.auth.oauth2.LocalServerReceiver; import com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeFlow; import com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets; import com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets.Details; @@ -136,12 +134,6 @@ public class AuthModule { } } - @Provides - public static AuthorizationCodeInstalledApp provideAuthorizationCodeInstalledApp( - GoogleAuthorizationCodeFlow flow) { - return new AuthorizationCodeInstalledApp(flow, new LocalServerReceiver()); - } - @Provides static Details provideDefaultInstalledDetails() { return new Details()