1
0
mirror of https://github.com/google/nomulus synced 2026-02-05 20:41:08 +00:00

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-03 13:05:21 -08:00
committed by Ben McIlwain
parent 338f7343ba
commit 2af24c945c
5 changed files with 71 additions and 19 deletions

View File

@@ -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())