public static boolean verifyRequestTime(ContainerRequestContext context,long skew,IDiagnosticsLogger log){
  long currentTime=System.currentTimeMillis();
  Date beginsAt=new Date(currentTime - skew);
  Date expiresAt=new Date(currentTime + skew);
  Date requestTime=context.getDate();
  if (requestTime.before(beginsAt) || requestTime.after(expiresAt)) {
    log.error(String.format("Request time outside of acceptable range. Request time: '%s'. Acceptable range: ['%s', '%s']",requestTime,beginsAt,expiresAt));
    return false;
  }
  return true;
}

public static boolean verifyRequestTime ( ContainerRequestContext context , long skew , IDiagnosticsLogger log ) { long currentTime = System . currentTimeMillis ( ) ; Date beginsAt = new Date ( currentTime - skew ) ; Date expiresAt = new Date ( currentTime + skew ) ; Date requestTime = context . getDate ( ) ; if ( requestTime . before ( beginsAt ) || requestTime . after ( expiresAt ) ) { log . error ( String . format ( "Request time outside of acceptable range. Request time: '%s'. Acceptable range: ['%s', '%s']" , requestTime , beginsAt , expiresAt ) ) ; return false ; } return true ; }
verifies the request was issued within a certain amount of skew .
