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:
gbrodman 2019-05-06 07:43:39 -07:00 committed by jianglai
parent 1480181fe1
commit df7e9a1225
9 changed files with 344 additions and 55 deletions

View file

@ -31,8 +31,8 @@ import org.joda.time.DateTime;
*/
public class AllocationTokenCustomLogic {
/** Performs additional custom logic for verifying a token. */
public AllocationToken verifyToken(
/** Performs additional custom logic for validating a token. */
public AllocationToken validateToken(
DomainCommand.Create command,
AllocationToken token,
Registry registry,