mirror of
https://github.com/google/nomulus
synced 2026-01-10 16:00:52 +00:00
Allow PasswordGenerator to use different alphabets
Per mcilwain's suggestion in the LRP design doc, LRP tokens should use a Base58 alphabet. I'll move PasswordGenerator out of the tools package and into a utils class in a future CL, as we'll want to use this generator in the LrpToken class itself rather than relegate the token definition to a tool. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=132358363
This commit is contained in:
@@ -76,14 +76,14 @@ final class CreateDomainCommand extends MutatingEppToolCommand implements GtechC
|
||||
private String password;
|
||||
|
||||
@Inject
|
||||
PasswordGenerator passwordGenerator;
|
||||
StringGenerator passwordGenerator;
|
||||
|
||||
private static final int PASSWORD_LENGTH = 16;
|
||||
|
||||
@Override
|
||||
protected void initMutatingEppToolCommand() {
|
||||
if (isNullOrEmpty(password)) {
|
||||
password = passwordGenerator.createPassword(PASSWORD_LENGTH);
|
||||
password = passwordGenerator.createString(PASSWORD_LENGTH);
|
||||
}
|
||||
checkArgument(ns == null || ns.size() <= 13, "There can be at most 13 nameservers.");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user