Skip to content

Commit

Permalink
add new API - Automatic (https://www.automatic.com/) (thanks to https…
Browse files Browse the repository at this point in the history
  • Loading branch information
kullfar committed Apr 4, 2018
1 parent 8ded159 commit 09364b6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ ScribeJava support out-of-box several HTTP clients:

### Supports all major 1.0a and 2.0 OAuth APIs out-of-the-box

* Automatic (http://www.automatic.com/)
* Automatic (https://www.automatic.com/)
* AWeber (http://www.aweber.com/)
* Box (https://www.box.com/)
* Dataporten (https://docs.dataporten.no/)
Expand Down
1 change: 1 addition & 0 deletions changelog
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[SNAPSHOT]
* fix missing support for scope for refresh_token grant_type (thanks to https://github.com/tlxtellef)
* add email field to VKOAuth2AccessToken (thanks to https://github.com/grouzen)
* add new API - Automatic (https://www.automatic.com/) (thanks to https://github.com/ramsrib)

[5.3.0]
* fix Salesforce API (thanks to https://github.com/jhorowitz-firedrum)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@

import com.github.scribejava.core.builder.api.ClientAuthenticationType;
import com.github.scribejava.core.builder.api.DefaultApi20;
import com.github.scribejava.core.extractors.OAuth2AccessTokenExtractor;
import com.github.scribejava.core.extractors.OAuth2AccessTokenJsonExtractor;
import com.github.scribejava.core.extractors.TokenExtractor;
import com.github.scribejava.core.model.OAuth2AccessToken;
import com.github.scribejava.core.model.Verb;

public class AutomaticAPI extends DefaultApi20 {

Expand All @@ -18,18 +13,14 @@ protected AutomaticAPI() {
}

private static class InstanceHolder {

private static final AutomaticAPI INSTANCE = new AutomaticAPI();
}

public static AutomaticAPI instance() {
return InstanceHolder.INSTANCE;
}

@Override
public Verb getAccessTokenVerb() {
return Verb.POST;
}

@Override
public String getAccessTokenEndpoint() {
return ACCESS_TOKEN_ENDPOINT;
Expand All @@ -45,11 +36,6 @@ protected String getAuthorizationBaseUrl() {
return AUTHORIZE_URL;
}

@Override
public TokenExtractor<OAuth2AccessToken> getAccessTokenExtractor() {
return OAuth2AccessTokenJsonExtractor.instance();
}

@Override
public ClientAuthenticationType getClientAuthenticationType() {
return ClientAuthenticationType.REQUEST_BODY;
Expand Down

0 comments on commit 09364b6

Please sign in to comment.