// Path: intent-factory/src/main/java/com/jakewharton/u2020/intentfactory/IntentFactory.java
// public interface IntentFactory {
//   Intent createUrlIntent(String url);
// 
//   IntentFactory REAL = url -> {
//     Intent intent = new Intent(Intent.ACTION_VIEW);
//     intent.setData(Uri.parse(url));
//     intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// 
//     return intent;
//   };
// }


import android.content.Intent;
import android.net.Uri;
import com.f2prateek.rx.preferences.Preference;
import com.jakewharton.u2020.intentfactory.IntentFactory;
import com.squareup.moshi.Moshi;
import java.io.IOException;
import javax.inject.Inject;
import javax.inject.Singleton;
import okhttp3.FormBody;
import okhttp3.HttpUrl;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import timber.log.Timber;
package com.jakewharton.u2020.data.api.oauth;


@Singleton public final class OauthManager {
  private static final String CLIENT_ID = "5793abe5bcb6d90f0240";
  private static final String CLIENT_SECRET = "81a35659c60fc376629432a51fd81e5c66a8dace";

  private final IntentFactory intentFactory;
  private final OkHttpClient client;
  private final Moshi moshi;
  private final Preference<String> accessToken;

// Path: intent-factory/src/main/java/com/jakewharton/u2020/intentfactory/IntentFactory.java
// public interface IntentFactory {
//   Intent createUrlIntent(String url);
// 
//   IntentFactory REAL = url -> {
//     Intent intent = new Intent(Intent.ACTION_VIEW);
//     intent.setData(Uri.parse(url));
//     intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// 
//     return intent;
//   };
// }


// Path: app/src/main/java/com/jakewharton/u2020/data/api/oauth/OauthManager.java
import android.content.Intent;
import android.net.Uri;
import com.f2prateek.rx.preferences.Preference;
import com.jakewharton.u2020.intentfactory.IntentFactory;
import com.squareup.moshi.Moshi;
import java.io.IOException;
import javax.inject.Inject;
import javax.inject.Singleton;
import okhttp3.FormBody;
import okhttp3.HttpUrl;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import timber.log.Timber;

package com.jakewharton.u2020.data.api.oauth;


@Singleton public final class OauthManager {
  private static final String CLIENT_ID = "5793abe5bcb6d90f0240";
  private static final String CLIENT_SECRET = "81a35659c60fc376629432a51fd81e5c66a8dace";

  private final IntentFactory intentFactory;
  private final OkHttpClient client;
  private final Moshi moshi;
  private final Preference<String> accessToken;

  @Inject public OauthManager(IntentFactory intentFactory, OkHttpClient client, Moshi moshi,