code: public Credential createBigQueryCredential(Configuration config)
        throws GeneralSecurityException, IOException {
      Credential credential =
          CredentialFromAccessTokenProviderClassFactory.credential(
              new AccessTokenProviderClassFromConfigFactory().withOverridePrefix("mapred.bq"),
              config,
              BIGQUERY_OAUTH_SCOPES);
      if (credential != null) {
        return credential;
      }
  
      return HadoopCredentialConfiguration.newBuilder()
          .withConfiguration(config)
          .withOverridePrefix(BIGQUERY_CONFIG_PREFIX)
          .build()
          .getCredential(BIGQUERY_OAUTH_SCOPES);
    }
docs: Construct credentials from the passed Configuration.
  @throws IOException on IO Error.
  @throws GeneralSecurityException on General Security Error.