private boolean isExpired(long currentTime, long tokenTime) {
    LOG.debug("Checking if the token is expired or not. "
            + "CurrentTime = {}, tokenExpiryTime = {} TTL = {}", currentTime, tokenTime,
        ttlMs);
    if (currentTime >= tokenTime) {
      return (currentTime - tokenTime) > ttlMs;
    }
    return false;
  }
A token is generated when the SAML assertion is successfully validated. This Token
is passed back to the client (Jdbc/ODBC Driver) via the browser. This token is
presented by the subsequent http request as a bearer token.
service/src/java/org/apache/hive/service/auth/saml/HiveSamlAuthTokenGenerator.java