mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 08:27:14 +02:00
Validate on-load that an AllocationToken can be used
Check the timing (that is, whether or not we're in a promotion), the allowed registrar client IDs, and the allowed TLDs. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=246824080
This commit is contained in:
parent
1480181fe1
commit
df7e9a1225
9 changed files with 344 additions and 55 deletions
|
@ -114,6 +114,9 @@ import org.joda.time.Duration;
|
|||
/**
|
||||
* An EPP flow that creates a new domain resource.
|
||||
*
|
||||
* @error {@link google.registry.flows.domain.token.AllocationTokenFlowUtils.AllocationTokenNotInPromotionException}
|
||||
* @error {@link google.registry.flows.domain.token.AllocationTokenFlowUtils.AllocationTokenNotValidForRegistrarException}
|
||||
* @error {@link google.registry.flows.domain.token.AllocationTokenFlowUtils.AllocationTokenNotValidForTldException}
|
||||
* @error {@link google.registry.flows.domain.token.AllocationTokenFlowUtils.AlreadyRedeemedAllocationTokenException}
|
||||
* @error {@link google.registry.flows.domain.token.AllocationTokenFlowUtils.InvalidAllocationTokenException}
|
||||
* @error {@link google.registry.flows.exceptions.OnlyToolCanPassMetadataException}
|
||||
|
@ -445,7 +448,7 @@ public class DomainCreateFlow implements TransactionalFlow {
|
|||
eppInput.getSingleExtension(AllocationTokenExtension.class);
|
||||
return Optional.ofNullable(
|
||||
extension.isPresent()
|
||||
? allocationTokenFlowUtils.loadAndVerifyToken(
|
||||
? allocationTokenFlowUtils.loadTokenAndValidateDomainCreate(
|
||||
command, extension.get().getAllocationToken(), registry, clientId, now)
|
||||
: null);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue