Tweak the registrar-ote-setup web console

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=227736173
This commit is contained in:
guyben
2019-01-08 10:48:35 -05:00
committed by Ben McIlwain
parent 338f7343ba
commit 2af24c945c
5 changed files with 71 additions and 19 deletions
@@ -98,6 +98,7 @@ public final class ConsoleOteSetupAction implements Runnable {
@Inject @Config("base64StringGenerator") StringGenerator passwordGenerator;
@Inject @Parameter("clientId") Optional<String> clientId;
@Inject @Parameter("email") Optional<String> email;
@Inject @Parameter("password") Optional<String> optionalPassword;
@Inject ConsoleOteSetupAction() {}
@@ -170,7 +171,7 @@ public final class ConsoleOteSetupAction implements Runnable {
data.put("contactEmail", email.get());
try {
String password = passwordGenerator.createString(PASSWORD_LENGTH);
String password = optionalPassword.orElse(passwordGenerator.createString(PASSWORD_LENGTH));
ImmutableMap<String, String> clientIdToTld =
OteAccountBuilder.forClientId(clientId.get())
.addContact(email.get())