diff --git a/java/google/registry/tools/LoginCommand.java b/java/google/registry/tools/LoginCommand.java index 922072132..612d7a309 100644 --- a/java/google/registry/tools/LoginCommand.java +++ b/java/google/registry/tools/LoginCommand.java @@ -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); } -} \ No newline at end of file +} diff --git a/java/google/registry/tools/LogoutCommand.java b/java/google/registry/tools/LogoutCommand.java index ca1c8d70c..f72325be1 100644 --- a/java/google/registry/tools/LogoutCommand.java +++ b/java/google/registry/tools/LogoutCommand.java @@ -14,6 +14,7 @@ package google.registry.tools; +import com.beust.jcommander.Parameters; import com.google.api.client.auth.oauth2.StoredCredential; import com.google.api.client.util.store.AbstractDataStoreFactory; import google.registry.util.FormattingLogger; @@ -21,6 +22,7 @@ import java.io.IOException; import javax.inject.Inject; /** Logout (invalidates OAuth credentials). */ +@Parameters(commandDescription = "Remove local OAuth credentials") class LogoutCommand implements Command { private static final FormattingLogger logger = FormattingLogger.getLoggerForCallerClass();