Package org.scribe.builder

Examples of org.scribe.builder.ServiceBuilder


        return SUPPORTED_AUTH_TYPES;
    }

    @Override
    public OAuthService getOAuthService() {
        return new ServiceBuilder()
                .provider(GitHubApi.class)
                .apiKey(oauthClientId)
                .apiSecret(oauthSecret)
                .callback(oauthCallbackUrl)
                .build();
View Full Code Here


    /**
     * {@inheritDoc}
     */
    @Override
    public OAuthService getOAuthService() {
        return new ServiceBuilder()
                .provider(TwitterApi.class)
                .apiKey(oauthClientId)
                .apiSecret(oauthSecret)
                .callback(oauthCallbackUrl)
                .build();
View Full Code Here

        return new GoogleAnalyticsClient(connection);
    }

    @Override
    public OAuthService getOAuthService() {
        return new ServiceBuilder()
                .scope(AnalyticsScopes.ANALYTICS_READONLY)
                .provider(GoogleApi20.class)
                .apiKey(getClientId())
                .apiSecret(getClientSecret())
                .callback(getCallbackUrl())
View Full Code Here

        //The Access Token is used in all Data calls to the APIs - it basically says our application has been given access
        //to the approved information in LinkedIn
        Token accessToken = null;

        //Using the Scribe library we enter the information needed to begin the chain of Oauth2 calls.
        OAuthService service = new ServiceBuilder()
                                .provider(LinkedInApi.class)
                                .apiKey(API_KEY)
                                .apiSecret(API_SECRET)
                                .build();
View Full Code Here

  }

  private static OAuthorize oauthorize(String clientId, String clientSecret) {

    // Execute out-of-band OAuth steps to obtain an access token.
    OAuthService oAuthService = new ServiceBuilder()
        .provider(GoogleApi.class)
        .apiKey(clientId)
        .apiSecret(clientSecret)
        .scope("https://mail.google.com/")
        .build();
View Full Code Here

     */
    private DropboxClientBuilder(String appKey, String appSecret) {
        Preconditions.checkNotNull(appKey, "App key cannot be null");
        Preconditions.checkNotNull(appSecret, "App secret cannot be null");

        service = new ServiceBuilder()
                .provider(new DropboxApi())
                .apiKey(appKey)
                .apiSecret(appSecret)
                .build();
    }
View Full Code Here

    }

    public AuthCreditials generateCreditialsWithToken(AuthCreditials authCreditials, String username, String password) throws WfirmaApiException {
        try {

            OAuthService service = new ServiceBuilder()
                    .provider(WfirmaAPI.class)
                    .apiKey(authCreditials.getConsumerKey())
                    .apiSecret(authCreditials.getConsumerSecret())
                    .scope("oauth-read")
                    .callback("https://wfirmacallback")
View Full Code Here

      }
      String serverName = Application.NETWORK_HTTP_URL.getValueAsString();
      serverUrl.append(serverName!=null?serverName:DEFAULT_HOST);
      String serverPort = Application.NETWORK_HTTP_PORT.getValueAsString();
      serverUrl.append(serverPort!=null?":"+serverPort:":"+DEFAULT_PORT);
      this.service = new ServiceBuilder().
          provider(provider())
          .apiKey(this.token.getToken())
          .apiSecret(this.token.getSecret())
          .callback(serverUrl.toString()+"/login/"+socialNetwork+"/callback")
          .build();
View Full Code Here

  /**
   * Initialization method for a secured CartoDB client.
   * You only need it if you're using the default constructor.
   */
  public void init(){
    oAuthService = new ServiceBuilder()
      .provider(new CartoDBAPI.SSL(user, password))
      .apiKey(consumerKey)
      .apiSecret(consumerSecret)
      .build();
    accessToken = oAuthService.getAccessToken(null, null);
View Full Code Here

{
    private static final String PROTECTED_RESOURCE_URL = "http://api.meetup.com/2/member/self";

    public static void main(String[] args)
    {
      OAuthService service = new ServiceBuilder()
                                  .provider(MeetupApi.class)
                                  .apiKey("j1khkp0dus323ftve0sdcv6ffe")
                                  .apiSecret("6s6gt6q59gvfjtsvgcmht62gq4")
                                  .build();
      Scanner in = new Scanner(System.in);
View Full Code Here

TOP

Related Classes of org.scribe.builder.ServiceBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.