mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +02:00
Add necessary fields to the AllocationToken schema
See https://docs.google.com/document/d/1SSWrILRpx0Mtr4sdvlYwz9I8wJp5Gu_o4qlml3iJDKI This is just the base for now--we don't actually do anything with it. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=243265164
This commit is contained in:
parent
3b87d4de64
commit
63807aa9be
11 changed files with 356 additions and 31 deletions
|
@ -18,6 +18,7 @@ import static com.google.common.base.Preconditions.checkArgument;
|
|||
import static com.google.common.collect.ImmutableSet.toImmutableSet;
|
||||
import static com.google.common.collect.Queues.newArrayDeque;
|
||||
import static com.google.common.collect.Sets.difference;
|
||||
import static google.registry.model.domain.token.AllocationToken.TokenType.SINGLE_USE;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.util.StringGenerator.DEFAULT_PASSWORD_LENGTH;
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
@ -117,6 +118,8 @@ class GenerateAllocationTokensCommand implements CommandWithRemoteApi {
|
|||
.map(
|
||||
t -> {
|
||||
AllocationToken.Builder token = new AllocationToken.Builder().setToken(t);
|
||||
// TODO(b/129471448): allow this to be unlimited-use as well
|
||||
token.setTokenType(SINGLE_USE);
|
||||
if (domainNames != null) {
|
||||
token.setDomainName(domainNames.removeFirst());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue