1
0
mirror of https://github.com/google/nomulus synced 2026-06-09 16:33:02 +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](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
This commit is contained in:
Lai Jiang
2019-06-18 15:55:33 -04:00
committed by GitHub
parent 3df11e7849
commit fd1c364a14
@@ -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()