public static Token<? extends TokenIdentifier> obtainToken(Connection conn, String username,
    char[] password) throws IOException {
    ShadeTokenIdentifier identifier = new ShadeTokenIdentifier(username);
    return new Token<>(identifier.getBytes(), Bytes.toBytes(new String(password)),
      new Text(ShadeSaslAuthenticationProvider.TOKEN_KIND),
      new Text(conn.getAdmin().getClusterMetrics().getClusterId()));
  }
Used to acquire tokens for the ShadeSaslAuthenticationProvider.
hbase-examples/src/main/java/org/apache/hadoop/hbase/security/provider/example/ShadeClientTokenUtil.java