1 package com.atlassian.asap.core.exception;
2
3 import com.atlassian.asap.api.exception.InvalidTokenException;
4
5 import java.time.Instant;
6
7 /**
8 * Thrown when a token was received before the not-before date/time listed in the nbf claim.
9 */
10 public class TokenTooEarlyException extends InvalidTokenException {
11 public TokenTooEarlyException(Instant notBefore, Instant now) {
12 super(String.format("Not-before time is %s and time is now %s", notBefore, now));
13 }
14 }