@Override
  public String get(String username, String relayStateKey) {
    String id = String.valueOf(rand.nextLong());
    String time = String.valueOf(System.currentTimeMillis());
    LOG.debug("Generating token for user {} with id {} and time {}", username, id, time);
    String tokenStr = getTokenStr(username, id, time, relayStateKey);
    return encode(sign(tokenStr));
  }
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