Package org.scribe.builder.api
Class DefaultApi10a
java.lang.Object
org.scribe.builder.api.DefaultApi10a
- All Implemented Interfaces:
Api
- Direct Known Subclasses:
AWeberApi
,ConstantContactApi
,DiggApi
,DropBoxApi
,EvernoteApi
,FlickrApi
,FoursquareApi
,FreelancerApi
,GetGlueApi
,GoogleApi
,ImgUrApi
,KaixinApi
,LinkedInApi
,LoveFilmApi
,MeetupApi
,MendeleyApi
,MisoApi
,NeteaseWeibooApi
,NetProspexApi
,PlurkApi
,Px500Api
,QWeiboApi
,SapoApi
,SimpleGeoApi
,SinaWeiboApi
,SkyrockApi
,SohuWeiboApi
,TrelloApi
,TumblrApi
,TwitterApi
,UbuntuOneApi
,VimeoApi
,XingApi
,YahooApi
,YammerApi
Default implementation of the OAuth protocol, version 1.0a
This class is meant to be extended by concrete implementations of the API,
providing the endpoints and endpoint-http-verbs.
If your Api adheres to the 1.0a protocol correctly, you just need to extend
this class and define the getters for your endpoints.
If your Api does something a bit different, you can override the different
extractors or services, in order to fine-tune the process. Please read the
javadocs of the interfaces to get an idea of what to do.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateService
(OAuthConfig config) Returns theOAuthService
for this Apiabstract String
Returns the URL that receives the access token requests.Returns the access token extractor.Returns the verb for the access token endpoint (defaults to POST)abstract String
getAuthorizationUrl
(Token requestToken) Returns the URL where you should redirect your users to authenticate your application.Returns the base string extractor.Returns the header extractor.abstract String
Returns the URL that receives the request token requests.Returns the request token extractor.Returns the verb for the request token endpoint (defaults to POST)Returns the signature service.Returns the timestamp service.
-
Constructor Details
-
DefaultApi10a
public DefaultApi10a()
-
-
Method Details
-
getAccessTokenExtractor
Returns the access token extractor.- Returns:
- access token extractor
-
getBaseStringExtractor
Returns the base string extractor.- Returns:
- base string extractor
-
getHeaderExtractor
Returns the header extractor.- Returns:
- header extractor
-
getRequestTokenExtractor
Returns the request token extractor.- Returns:
- request token extractor
-
getSignatureService
Returns the signature service.- Returns:
- signature service
-
getTimestampService
Returns the timestamp service.- Returns:
- timestamp service
-
getAccessTokenVerb
Returns the verb for the access token endpoint (defaults to POST)- Returns:
- access token endpoint verb
-
getRequestTokenVerb
Returns the verb for the request token endpoint (defaults to POST)- Returns:
- request token endpoint verb
-
getRequestTokenEndpoint
Returns the URL that receives the request token requests.- Returns:
- request token URL
-
getAccessTokenEndpoint
Returns the URL that receives the access token requests.- Returns:
- access token URL
-
getAuthorizationUrl
Returns the URL where you should redirect your users to authenticate your application.- Parameters:
requestToken
- the request token you need to authorize- Returns:
- the URL where you should redirect your users
-
createService
Returns theOAuthService
for this Api- Specified by:
createService
in interfaceApi
- Parameters:
apiKey
- KeyapiSecret
- Api Secretcallback
- OAuth callback (either URL or 'oob')scope
- OAuth scope (optional)- Returns:
- fully configured
OAuthService
-