Skip to content

Commit

Permalink
drop OAuthConfig, remove deprecate usaged
Browse files Browse the repository at this point in the history
  • Loading branch information
kullfar committed Apr 18, 2018
1 parent 4b46ba4 commit 47c0732
Show file tree
Hide file tree
Showing 23 changed files with 100 additions and 399 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import com.github.scribejava.core.httpclient.HttpClient;
import com.github.scribejava.core.httpclient.HttpClientConfig;
import com.github.scribejava.core.model.OAuth2AccessToken;
import com.github.scribejava.core.model.OAuthConfig;
import com.github.scribejava.core.model.Verb;
import java.io.OutputStream;

Expand Down Expand Up @@ -74,20 +73,7 @@ public ClientAuthenticationType getClientAuthenticationType() {
public FacebookService createService(String apiKey, String apiSecret, String callback, String scope,
OutputStream debugStream, String state, String responseType, String userAgent,
HttpClientConfig httpClientConfig, HttpClient httpClient) {
return new FacebookService(this, apiKey, apiSecret, callback, scope, debugStream, state, responseType,
userAgent, httpClientConfig, httpClient);
}

/**
* @deprecated use {@link #createService(java.lang.String, java.lang.String, java.lang.String, java.lang.String,
* java.io.OutputStream, java.lang.String, java.lang.String, java.lang.String,
* com.github.scribejava.core.httpclient.HttpClientConfig, com.github.scribejava.core.httpclient.HttpClient)}
*/
@Deprecated
@Override
public FacebookService createService(OAuthConfig config) {
return createService(config.getApiKey(), config.getApiSecret(), config.getCallback(), config.getScope(),
config.getDebugStream(), config.getState(), config.getResponseType(), config.getUserAgent(),
config.getHttpClientConfig(), config.getHttpClient());
return new FacebookService(this, apiKey, apiSecret, callback, scope, state, responseType, userAgent,
httpClientConfig, httpClient);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.github.scribejava.core.builder.api.DefaultApi20;
import com.github.scribejava.core.httpclient.HttpClient;
import com.github.scribejava.core.httpclient.HttpClientConfig;
import com.github.scribejava.core.model.OAuthConfig;
import com.github.scribejava.core.model.OAuthConstants;
import com.github.scribejava.core.model.ParameterList;
import java.io.OutputStream;
Expand Down Expand Up @@ -59,21 +58,8 @@ protected String getAuthorizationBaseUrl() {
public ImgurOAuthService createService(String apiKey, String apiSecret, String callback, String scope,
OutputStream debugStream, String state, String responseType, String userAgent,
HttpClientConfig httpClientConfig, HttpClient httpClient) {
return new ImgurOAuthService(this, apiKey, apiSecret, callback, scope, debugStream, state, responseType,
userAgent, httpClientConfig, httpClient);
}

/**
* @deprecated use {@link #createService(java.lang.String, java.lang.String, java.lang.String, java.lang.String,
* java.io.OutputStream, java.lang.String, java.lang.String, java.lang.String,
* com.github.scribejava.core.httpclient.HttpClientConfig, com.github.scribejava.core.httpclient.HttpClient)}
*/
@Deprecated
@Override
public ImgurOAuthService createService(OAuthConfig config) {
return createService(config.getApiKey(), config.getApiSecret(), config.getCallback(), config.getScope(),
config.getDebugStream(), config.getState(), config.getResponseType(), config.getUserAgent(),
config.getHttpClientConfig(), config.getHttpClient());
return new ImgurOAuthService(this, apiKey, apiSecret, callback, scope, state, responseType, userAgent,
httpClientConfig, httpClient);
}

public static boolean isOob(String callback) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.github.scribejava.apis;

import com.github.scribejava.core.builder.api.DefaultApi20;
import com.github.scribejava.core.model.OAuthConfig;
import com.github.scribejava.apis.service.MailruOAuthService;
import com.github.scribejava.core.httpclient.HttpClient;
import com.github.scribejava.core.httpclient.HttpClientConfig;
Expand Down Expand Up @@ -34,20 +33,7 @@ protected String getAuthorizationBaseUrl() {
public MailruOAuthService createService(String apiKey, String apiSecret, String callback, String scope,
OutputStream debugStream, String state, String responseType, String userAgent,
HttpClientConfig httpClientConfig, HttpClient httpClient) {
return new MailruOAuthService(this, apiKey, apiSecret, callback, scope, debugStream, state, responseType,
userAgent, httpClientConfig, httpClient);
}

/**
* @deprecated use {@link #createService(java.lang.String, java.lang.String, java.lang.String, java.lang.String,
* java.io.OutputStream, java.lang.String, java.lang.String, java.lang.String,
* com.github.scribejava.core.httpclient.HttpClientConfig, com.github.scribejava.core.httpclient.HttpClient)}
*/
@Deprecated
@Override
public MailruOAuthService createService(OAuthConfig config) {
return createService(config.getApiKey(), config.getApiSecret(), config.getCallback(), config.getScope(),
config.getDebugStream(), config.getState(), config.getResponseType(), config.getUserAgent(),
config.getHttpClientConfig(), config.getHttpClient());
return new MailruOAuthService(this, apiKey, apiSecret, callback, scope, state, responseType, userAgent,
httpClientConfig, httpClient);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import com.github.scribejava.core.builder.api.DefaultApi20;
import com.github.scribejava.core.httpclient.HttpClient;
import com.github.scribejava.core.httpclient.HttpClientConfig;
import com.github.scribejava.core.model.OAuthConfig;
import java.io.OutputStream;

/**
Expand Down Expand Up @@ -53,21 +52,8 @@ protected String getAuthorizationBaseUrl() {
public MicrosoftAzureActiveDirectoryService createService(String apiKey, String apiSecret, String callback,
String scope, OutputStream debugStream, String state, String responseType, String userAgent,
HttpClientConfig httpClientConfig, HttpClient httpClient) {
return new MicrosoftAzureActiveDirectoryService(this, apiKey, apiSecret, callback, scope, debugStream, state,
responseType, userAgent, httpClientConfig, httpClient);
}

/**
* @deprecated use {@link #createService(java.lang.String, java.lang.String, java.lang.String, java.lang.String,
* java.io.OutputStream, java.lang.String, java.lang.String, java.lang.String,
* com.github.scribejava.core.httpclient.HttpClientConfig, com.github.scribejava.core.httpclient.HttpClient)}
*/
@Deprecated
@Override
public MicrosoftAzureActiveDirectoryService createService(OAuthConfig config) {
return createService(config.getApiKey(), config.getApiSecret(), config.getCallback(), config.getScope(),
config.getDebugStream(), config.getState(), config.getResponseType(), config.getUserAgent(),
config.getHttpClientConfig(), config.getHttpClient());
return new MicrosoftAzureActiveDirectoryService(this, apiKey, apiSecret, callback, scope, state, responseType,
userAgent, httpClientConfig, httpClient);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import com.github.scribejava.core.builder.api.OAuth2SignatureType;
import com.github.scribejava.core.httpclient.HttpClient;
import com.github.scribejava.core.httpclient.HttpClientConfig;
import com.github.scribejava.core.model.OAuthConfig;
import java.io.OutputStream;

public class OdnoklassnikiApi extends DefaultApi20 {
Expand Down Expand Up @@ -36,21 +35,8 @@ protected String getAuthorizationBaseUrl() {
public OdnoklassnikiOAuthService createService(String apiKey, String apiSecret, String callback, String scope,
OutputStream debugStream, String state, String responseType, String userAgent,
HttpClientConfig httpClientConfig, HttpClient httpClient) {
return new OdnoklassnikiOAuthService(this, apiKey, apiSecret, callback, scope, debugStream, state, responseType,
userAgent, httpClientConfig, httpClient);
}

/**
* @deprecated use {@link #createService(java.lang.String, java.lang.String, java.lang.String, java.lang.String,
* java.io.OutputStream, java.lang.String, java.lang.String, java.lang.String,
* com.github.scribejava.core.httpclient.HttpClientConfig, com.github.scribejava.core.httpclient.HttpClient)}
*/
@Deprecated
@Override
public OdnoklassnikiOAuthService createService(OAuthConfig config) {
return createService(config.getApiKey(), config.getApiSecret(), config.getCallback(), config.getScope(),
config.getDebugStream(), config.getState(), config.getResponseType(), config.getUserAgent(),
config.getHttpClientConfig(), config.getHttpClient());
return new OdnoklassnikiOAuthService(this, apiKey, apiSecret, callback, scope, state, responseType, userAgent,
httpClientConfig, httpClient);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.github.scribejava.core.builder.api.DefaultApi20;
import com.github.scribejava.core.httpclient.HttpClient;
import com.github.scribejava.core.httpclient.HttpClientConfig;
import com.github.scribejava.core.model.OAuthConfig;
import java.io.OutputStream;

public class TutByApi extends DefaultApi20 {
Expand Down Expand Up @@ -34,20 +33,7 @@ protected String getAuthorizationBaseUrl() {
public TutByOAuthService createService(String apiKey, String apiSecret, String callback, String scope,
OutputStream debugStream, String state, String responseType, String userAgent,
HttpClientConfig httpClientConfig, HttpClient httpClient) {
return new TutByOAuthService(this, apiKey, apiSecret, callback, scope, debugStream, state, responseType,
userAgent, httpClientConfig, httpClient);
}

/**
* @deprecated use {@link #createService(java.lang.String, java.lang.String, java.lang.String, java.lang.String,
* java.io.OutputStream, java.lang.String, java.lang.String, java.lang.String,
* com.github.scribejava.core.httpclient.HttpClientConfig, com.github.scribejava.core.httpclient.HttpClient)}
*/
@Deprecated
@Override
public TutByOAuthService createService(OAuthConfig config) {
return createService(config.getApiKey(), config.getApiSecret(), config.getCallback(), config.getScope(),
config.getDebugStream(), config.getState(), config.getResponseType(), config.getUserAgent(),
config.getHttpClientConfig(), config.getHttpClient());
return new TutByOAuthService(this, apiKey, apiSecret, callback, scope, state, responseType, userAgent,
httpClientConfig, httpClient);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.github.scribejava.core.builder.api.DefaultApi20;
import com.github.scribejava.core.httpclient.HttpClient;
import com.github.scribejava.core.httpclient.HttpClientConfig;
import com.github.scribejava.core.model.OAuthConfig;
import com.github.scribejava.core.model.OAuthRequest;
import com.github.scribejava.core.oauth.OAuth20Service;
import java.io.OutputStream;
Expand All @@ -17,22 +16,20 @@ public class FacebookService extends OAuth20Service {

/**
* @deprecated use {@link #FacebookService(com.github.scribejava.core.builder.api.DefaultApi20, java.lang.String,
* java.lang.String, java.lang.String, java.lang.String, java.io.OutputStream, java.lang.String, java.lang.String,
* java.lang.String, com.github.scribejava.core.httpclient.HttpClientConfig,
* com.github.scribejava.core.httpclient.HttpClient)}
* java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String,
* com.github.scribejava.core.httpclient.HttpClientConfig, com.github.scribejava.core.httpclient.HttpClient)}
*/
@Deprecated
public FacebookService(DefaultApi20 api, OAuthConfig config) {
this(api, config.getApiKey(), config.getApiSecret(), config.getCallback(), config.getScope(),
config.getDebugStream(), config.getState(), config.getResponseType(), config.getUserAgent(),
config.getHttpClientConfig(), config.getHttpClient());
}

public FacebookService(DefaultApi20 api, String apiKey, String apiSecret, String callback, String scope,
OutputStream debugStream, String state, String responseType, String userAgent,
HttpClientConfig httpClientConfig, HttpClient httpClient) {
super(api, apiKey, apiSecret, callback, scope, debugStream, state, responseType, userAgent, httpClientConfig,
httpClient);
this(api, apiKey, apiSecret, callback, scope, state, responseType, userAgent, httpClientConfig, httpClient);
}

public FacebookService(DefaultApi20 api, String apiKey, String apiSecret, String callback, String scope,
String state, String responseType, String userAgent, HttpClientConfig httpClientConfig,
HttpClient httpClient) {
super(api, apiKey, apiSecret, callback, scope, state, responseType, userAgent, httpClientConfig, httpClient);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.github.scribejava.core.builder.api.DefaultApi20;
import com.github.scribejava.core.httpclient.HttpClient;
import com.github.scribejava.core.httpclient.HttpClientConfig;
import com.github.scribejava.core.model.OAuthConfig;
import com.github.scribejava.core.model.OAuthConstants;
import com.github.scribejava.core.model.OAuthRequest;
import com.github.scribejava.core.oauth.OAuth20Service;
Expand All @@ -14,22 +13,20 @@ public class ImgurOAuthService extends OAuth20Service {

/**
* @deprecated use {@link #ImgurOAuthService(com.github.scribejava.core.builder.api.DefaultApi20, java.lang.String,
* java.lang.String, java.lang.String, java.lang.String, java.io.OutputStream, java.lang.String, java.lang.String,
* java.lang.String, com.github.scribejava.core.httpclient.HttpClientConfig,
* com.github.scribejava.core.httpclient.HttpClient)}
* java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String,
* com.github.scribejava.core.httpclient.HttpClientConfig, com.github.scribejava.core.httpclient.HttpClient)}
*/
@Deprecated
public ImgurOAuthService(DefaultApi20 api, OAuthConfig config) {
this(api, config.getApiKey(), config.getApiSecret(), config.getCallback(), config.getScope(),
config.getDebugStream(), config.getState(), config.getResponseType(), config.getUserAgent(),
config.getHttpClientConfig(), config.getHttpClient());
}

public ImgurOAuthService(DefaultApi20 api, String apiKey, String apiSecret, String callback, String scope,
OutputStream debugStream, String state, String responseType, String userAgent,
HttpClientConfig httpClientConfig, HttpClient httpClient) {
super(api, apiKey, apiSecret, callback, scope, debugStream, state, responseType, userAgent, httpClientConfig,
httpClient);
this(api, apiKey, apiSecret, callback, scope, state, responseType, userAgent, httpClientConfig, httpClient);
}

public ImgurOAuthService(DefaultApi20 api, String apiKey, String apiSecret, String callback, String scope,
String state, String responseType, String userAgent, HttpClientConfig httpClientConfig,
HttpClient httpClient) {
super(api, apiKey, apiSecret, callback, scope, state, responseType, userAgent, httpClientConfig, httpClient);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import com.github.scribejava.core.builder.api.DefaultApi20;
import com.github.scribejava.core.httpclient.HttpClient;
import com.github.scribejava.core.httpclient.HttpClientConfig;
import com.github.scribejava.core.model.OAuthConfig;
import com.github.scribejava.core.model.OAuthRequest;
import com.github.scribejava.core.oauth.OAuth20Service;
import java.io.OutputStream;
Expand All @@ -20,22 +19,20 @@ public class MailruOAuthService extends OAuth20Service {

/**
* @deprecated use {@link #MailruOAuthService(com.github.scribejava.core.builder.api.DefaultApi20, java.lang.String,
* java.lang.String, java.lang.String, java.lang.String, java.io.OutputStream, java.lang.String, java.lang.String,
* java.lang.String, com.github.scribejava.core.httpclient.HttpClientConfig,
* com.github.scribejava.core.httpclient.HttpClient)}
* java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String,
* com.github.scribejava.core.httpclient.HttpClientConfig, com.github.scribejava.core.httpclient.HttpClient)}
*/
@Deprecated
public MailruOAuthService(DefaultApi20 api, OAuthConfig config) {
this(api, config.getApiKey(), config.getApiSecret(), config.getCallback(), config.getScope(),
config.getDebugStream(), config.getState(), config.getResponseType(), config.getUserAgent(),
config.getHttpClientConfig(), config.getHttpClient());
}

public MailruOAuthService(DefaultApi20 api, String apiKey, String apiSecret, String callback, String scope,
OutputStream debugStream, String state, String responseType, String userAgent,
HttpClientConfig httpClientConfig, HttpClient httpClient) {
super(api, apiKey, apiSecret, callback, scope, debugStream, state, responseType, userAgent, httpClientConfig,
httpClient);
this(api, apiKey, apiSecret, callback, scope, state, responseType, userAgent, httpClientConfig, httpClient);
}

public MailruOAuthService(DefaultApi20 api, String apiKey, String apiSecret, String callback, String scope,
String state, String responseType, String userAgent, HttpClientConfig httpClientConfig,
HttpClient httpClient) {
super(api, apiKey, apiSecret, callback, scope, state, responseType, userAgent, httpClientConfig, httpClient);
}


Expand Down
Loading

0 comments on commit 47c0732

Please sign in to comment.