@InterfaceAudience.Private
  static Token<AuthenticationTokenIdentifier> obtainToken(Connection conn) throws IOException {
    Table meta = null;
    try {
      injectFault();

      meta = conn.getTable(TableName.META_TABLE_NAME);
      CoprocessorRpcChannel rpcChannel = meta.coprocessorService(HConstants.EMPTY_START_ROW);
      AuthenticationProtos.AuthenticationService.BlockingInterface service =
        AuthenticationProtos.AuthenticationService.newBlockingStub(rpcChannel);
      AuthenticationProtos.GetAuthenticationTokenResponse response = service.getAuthenticationToken(
        null, AuthenticationProtos.GetAuthenticationTokenRequest.getDefaultInstance());

      return toToken(response.getToken());
    } catch (ServiceException se) {
      throw ProtobufUtil.handleRemoteException(se);
    } finally {
      if (meta != null) {
        meta.close();
      }
    }
  }
Obtain and return an authentication token for the current user.
@param conn The HBase cluster connection
@throws IOException if a remote error or serialization problem occurs.
@return the authentication token instance
hbase-client/src/main/java/org/apache/hadoop/hbase/security/token/ClientTokenUtil.java