1
0
mirror of https://github.com/google/nomulus synced 2026-01-04 04:04:22 +00:00

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](8bdc77501f/core/src/main/java/google/registry/tools/LoginCommand.java (L43)),
the instance is created directly in the command.

* Remove unused imports
This commit is contained in:
Lai Jiang
2019-06-18 15:55:33 -04:00
committed by GitHub
parent 3df11e7849
commit fd1c364a14

View File

@@ -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()