|
1 | 1 | package com.codepath.oauth;
|
2 | 2 |
|
3 |
| -import android.content.Context; |
4 | 3 | import android.net.Uri;
|
5 | 4 |
|
6 |
| -import com.codepath.asynchttpclient.AsyncHttpClient; |
7 |
| -import com.codepath.utils.AsyncSimpleTask; |
8 | 5 | import com.github.scribejava.core.builder.ServiceBuilder;
|
9 | 6 | import com.github.scribejava.core.builder.api.BaseApi;
|
10 | 7 | import com.github.scribejava.core.exceptions.OAuthException;
|
|
19 | 16 | import com.github.scribejava.core.oauth.OAuthService;
|
20 | 17 |
|
21 | 18 | /*
|
22 |
| - * OAuthAsyncHttpClient is responsible for managing the request and access token exchanges and then |
| 19 | + * OAuthTokenClient is responsible for managing the request and access token exchanges and then |
23 | 20 | * signing all requests with the OAuth signature after access token has been retrieved and stored.
|
24 | 21 | * The client is based on AsyncHttpClient for async http requests and uses Scribe to manage the OAuth authentication.
|
25 | 22 | */
|
26 |
| -public class OAuthAsyncHttpClient extends AsyncHttpClient { |
| 23 | +public class OAuthTokenClient { |
27 | 24 |
|
28 | 25 | private BaseApi apiInstance;
|
29 | 26 | private OAuthTokenHandler handler;
|
30 | 27 | private Token accessToken;
|
31 | 28 | private OAuthService service;
|
32 | 29 |
|
33 | 30 | // Requires the apiClass, consumerKey, consumerSecret and callbackUrl along with the TokenHandler
|
34 |
| - public OAuthAsyncHttpClient(BaseApi apiInstance, String consumerKey, String consumerSecret, String callbackUrl, |
35 |
| - OAuthTokenHandler handler) { |
| 31 | + public OAuthTokenClient(BaseApi apiInstance, String consumerKey, String consumerSecret, String callbackUrl, |
| 32 | + OAuthTokenHandler handler) { |
36 | 33 | this.apiInstance = apiInstance;
|
37 | 34 | this.handler = handler;
|
38 | 35 | if (callbackUrl == null) { callbackUrl = OAuthConstants.OUT_OF_BAND; };
|
|
0 commit comments