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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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