Class DefaultApi20

  • All Implemented Interfaces:
    Direct Known Subclasses:
    ConstantContactApi2, FacebookApi, Foursquare2Api, KaixinApi20, LiveApi, RenrenApi, SinaWeiboApi20, ViadeoApi, VkontakteApi

    public abstract class DefaultApi20
    extends Object
    implements Api
    Default implementation of the OAuth protocol, version 2.0 (draft 11) 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 2.0 (draft 11) 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 Detail

      • DefaultApi20

        public DefaultApi20()
    • Method Detail

      • getAccessTokenExtractor

        public AccessTokenExtractor getAccessTokenExtractor()
        Returns the access token extractor.
        access token extractor
      • getAccessTokenVerb

        public Verb getAccessTokenVerb()
        Returns the verb for the access token endpoint (defaults to GET)
        access token endpoint verb
      • getAccessTokenEndpoint

        public abstract String getAccessTokenEndpoint()
        Returns the URL that receives the access token requests.
        access token URL
      • getAuthorizationUrl

        public abstract String getAuthorizationUrl​(OAuthConfig config)
        Returns the URL where you should redirect your users to authenticate your application.
        config - OAuth 2.0 configuration param object
        the URL where you should redirect your users