@Override
  public AuthFlowConfiguration generateConfiguration(String callbackBaseUrl, String id) {
    String callback =
        (Strings.isNullOrEmpty(callbackBaseUrl)) ? OUT_OF_BOUNDS_CALLBACK : callbackBaseUrl;
    OAuthGetTemporaryToken tempTokenRequest =
        new OAuthGetTemporaryToken(config.getRequestTokenUrl());
    tempTokenRequest.callback = callback;
    tempTokenRequest.transport = httpTransport;
    tempTokenRequest.consumerKey = clientId;
    tempTokenRequest.signer = config.getRequestTokenSigner(clientSecret);
    config
        .getAdditionalUrlParameters(dataType, mode, OAuth1Step.REQUEST_TOKEN)
        .forEach(tempTokenRequest::set);

    TokenSecretAuthData authData;
    try {
      // get request token
      OAuthCredentialsResponse tempTokenResponse = tempTokenRequest.execute();
      authData = new TokenSecretAuthData(tempTokenResponse.token, tempTokenResponse.tokenSecret);
    } catch (IOException e) {
      monitor.severe(() -> "Error retrieving request token", e);
      return null;
    }

    OAuthAuthorizeTemporaryTokenUrl authorizeUrl =
        new OAuthAuthorizeTemporaryTokenUrl(config.getAuthorizationUrl());
    authorizeUrl.temporaryToken = authData.getToken();
    config
        .getAdditionalUrlParameters(dataType, mode, OAuth1Step.AUTHORIZATION)
        .forEach(authorizeUrl::set);

    String url = authorizeUrl.build();

    return new AuthFlowConfiguration(url, getTokenUrl(), AuthProtocol.OAUTH_1, authData);
  }
General implementation of an {@link AuthDataGenerator} for OAuth1.
libraries/auth/src/main/java/org/datatransferproject/auth/OAuth1DataGenerator.java