mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02: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:
parent
0c7443815a
commit
b05afd2153
2 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue