mirror of
https://github.com/google/nomulus
synced 2026-02-08 05:50:24 +00:00
Fix nomulus tool NPEs on login/logout commands when printing usage
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=149535358
This commit is contained in:
@@ -14,12 +14,14 @@
|
||||
|
||||
package google.registry.tools;
|
||||
|
||||
import com.beust.jcommander.Parameters;
|
||||
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 javax.inject.Inject;
|
||||
|
||||
/** Authorizes the nomulus tool for OAuth 2.0 access to remote resources. */
|
||||
@Parameters(commandDescription = "Create local OAuth credentials")
|
||||
final class LoginCommand implements Command {
|
||||
|
||||
@Inject GoogleAuthorizationCodeFlow flow;
|
||||
@@ -30,4 +32,4 @@ final class LoginCommand implements Command {
|
||||
new AuthorizationCodeInstalledApp(flow, new LocalServerReceiver())
|
||||
.authorize(clientScopeQualifier);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user