Skip to content

Commit 7a03f9b

Browse files
committed
rename client name
1 parent 600d27d commit 7a03f9b

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

app/src/main/java/com/codepath/oauth/OAuthBaseClient.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
public abstract class OAuthBaseClient {
1818
protected String baseUrl;
1919
protected Context context;
20-
protected OAuthAsyncHttpClient client;
20+
protected OAuthTokenClient client;
2121
protected SharedPreferences prefs;
2222
protected SharedPreferences.Editor editor;
2323
protected OAuthAccessHandler accessHandler;
@@ -48,8 +48,8 @@ public static OAuthBaseClient getInstance(Class<? extends OAuthBaseClient> klass
4848
public OAuthBaseClient(Context c, BaseApi apiInstance, String consumerUrl, String consumerKey, String consumerSecret, String callbackUrl) {
4949
this.baseUrl = consumerUrl;
5050
this.callbackUrl = callbackUrl;
51-
client = new OAuthAsyncHttpClient(apiInstance, consumerKey,
52-
consumerSecret, callbackUrl, new OAuthAsyncHttpClient.OAuthTokenHandler() {
51+
client = new OAuthTokenClient(apiInstance, consumerKey,
52+
consumerSecret, callbackUrl, new OAuthTokenClient.OAuthTokenHandler() {
5353

5454
// Store request token and launch the authorization URL in the browser
5555
@Override
@@ -143,7 +143,7 @@ public Token checkAccessToken() {
143143
return null;
144144
}
145145

146-
protected OAuthAsyncHttpClient getClient() {
146+
protected OAuthTokenClient getClient() {
147147
return client;
148148
}
149149

app/src/main/java/com/codepath/oauth/OAuthAsyncHttpClient.java app/src/main/java/com/codepath/oauth/OAuthTokenClient.java

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
package com.codepath.oauth;
22

3-
import android.content.Context;
43
import android.net.Uri;
54

6-
import com.codepath.asynchttpclient.AsyncHttpClient;
7-
import com.codepath.utils.AsyncSimpleTask;
85
import com.github.scribejava.core.builder.ServiceBuilder;
96
import com.github.scribejava.core.builder.api.BaseApi;
107
import com.github.scribejava.core.exceptions.OAuthException;
@@ -19,20 +16,20 @@
1916
import com.github.scribejava.core.oauth.OAuthService;
2017

2118
/*
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
2320
* signing all requests with the OAuth signature after access token has been retrieved and stored.
2421
* The client is based on AsyncHttpClient for async http requests and uses Scribe to manage the OAuth authentication.
2522
*/
26-
public class OAuthAsyncHttpClient extends AsyncHttpClient {
23+
public class OAuthTokenClient {
2724

2825
private BaseApi apiInstance;
2926
private OAuthTokenHandler handler;
3027
private Token accessToken;
3128
private OAuthService service;
3229

3330
// 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) {
3633
this.apiInstance = apiInstance;
3734
this.handler = handler;
3835
if (callbackUrl == null) { callbackUrl = OAuthConstants.OUT_OF_BAND; };

0 commit comments

Comments
 (0)