@Override
  public void initialize(ExtensionContext context) {
    if (initialized) {
      return;
    }

    monitor = context.getMonitor();
    String serviceName = oAuth1Config.getServiceName().toUpperCase();

    String keyName = serviceName + "_KEY";
    String secretName = serviceName + "_SECRET";
    try {
      appCredentials =
          context.getService(AppCredentialStore.class).getAppCredentials(keyName, secretName);
    } catch (IOException e) {
      monitor.info(
          () ->
              format(
                  "Unable to retrieve OAuth1 AppCredentials. Did you set %s and %s?",
                  keyName, secretName),
          e);

      return;
    }

    exportAuthDataGenerators = new HashMap<>();
    importAuthDataGenerators = new HashMap<>();
    httpTransport = context.getService(HttpTransport.class);
    initialized = true;
  }
General implementation of an {@link AuthServiceExtension} for OAuth1. Largely exists to provide
the appropriate {@link OAuth1DataGenerator} upon request.
libraries/auth/src/main/java/org/datatransferproject/auth/OAuth1ServiceExtension.java