Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #455 from robindrost/patch-2

Update TwitterApi.java
  • Loading branch information...
commit f70c628ac840245b97ebeae1280560b4f14b0d51 2 parents 3ac6997 + 7afdb1f
@fernandezpablo85 authored
Showing with 3 additions and 27 deletions.
  1. +3 −27 src/main/java/org/scribe/builder/api/TwitterApi.java
View
30 src/main/java/org/scribe/builder/api/TwitterApi.java
@@ -11,13 +11,13 @@
@Override
public String getAccessTokenEndpoint()
{
- return "http://" + ACCESS_TOKEN_RESOURCE;
+ return "https://" + ACCESS_TOKEN_RESOURCE;
}
@Override
public String getRequestTokenEndpoint()
{
- return "http://" + REQUEST_TOKEN_RESOURCE;
+ return "https://" + REQUEST_TOKEN_RESOURCE;
}
@Override
@@ -26,27 +26,10 @@ public String getAuthorizationUrl(Token requestToken)
return String.format(AUTHORIZE_URL, requestToken.getToken());
}
- public static class SSL extends TwitterApi
- {
- @Override
- public String getAccessTokenEndpoint()
- {
- return "https://" + ACCESS_TOKEN_RESOURCE;
- }
-
- @Override
- public String getRequestTokenEndpoint()
- {
- return "https://" + REQUEST_TOKEN_RESOURCE;
- }
- }
-
/**
* Twitter 'friendlier' authorization endpoint for OAuth.
- *
- * Uses SSL.
*/
- public static class Authenticate extends SSL
+ public static class Authenticate extends TwitterApi
{
private static final String AUTHENTICATE_URL = "https://api.twitter.com/oauth/authenticate?oauth_token=%s";
@@ -56,11 +39,4 @@ public String getAuthorizationUrl(Token requestToken)
return String.format(AUTHENTICATE_URL, requestToken.getToken());
}
}
-
- /**
- * Just an alias to the default (SSL) authorization endpoint.
- *
- * Need to include this for symmetry with 'Authenticate' only.
- */
- public static class Authorize extends SSL{}
}
Please sign in to comment.
Something went wrong with that request. Please try again.