Class AllocationTokenFlowUtils


  • public class AllocationTokenFlowUtils
    extends java.lang.Object
    Utility functions for dealing with AllocationTokens in domain flows.
    • Method Detail

      • loadTokenAndValidateDomainCreate

        public AllocationToken loadTokenAndValidateDomainCreate​(DomainCommand.Create command,
                                                                java.lang.String token,
                                                                Registry registry,
                                                                java.lang.String clientId,
                                                                org.joda.time.DateTime now)
                                                         throws EppException
        Loads an allocation token given a string and verifies that the token is valid for the domain create request.
        Returns:
        the loaded AllocationToken for that string.
        Throws:
        EppException - if the token doesn't exist, is already redeemed, or is otherwise invalid for this request.
      • checkDomainsWithToken

        public AllocationTokenDomainCheckResults checkDomainsWithToken​(java.util.List<com.google.common.net.InternetDomainName> domainNames,
                                                                       java.lang.String token,
                                                                       java.lang.String clientId,
                                                                       org.joda.time.DateTime now)
        Checks if the allocation token applies to the given domain names, used for domain checks.
        Returns:
        A map of domain names to domain check error response messages. If a message is present for a a given domain then it does not validate with this allocation token; domains that do validate have blank messages (i.e. no error).