Package org.scribe.builder

Examples of org.scribe.builder.ServiceBuilder


        super(ProviderType.Google);
    }

    @Override
    protected OAuthService buildService() {
         return new ServiceBuilder()
               .provider(GoogleApi.class)
               .apiKey(getConfigString("consumerKey"))
               .apiSecret(getConfigString("consumerSecret"))
               .callback(getCallbackUrl())
               .scope(getConfigString("scope"))
View Full Code Here


        super(ProviderType.Twitter);
    }

    @Override
    protected OAuthService buildService() {
         return new ServiceBuilder()
               .provider(TwitterApi.class)
               .apiKey(getConfigString("consumerKey"))
               .apiSecret(getConfigString("consumerSecret"))
               .callback(getCallbackUrl())
               .build();
View Full Code Here

  protected final OAuthService service;
  protected final Token token;
 
  public XeroClient(Reader pemReader, String consumerKey, String consumerSecret) {
    service = new ServiceBuilder()
        .provider(new XeroOAuthService(pemReader))
        .apiKey(consumerKey)
        .apiSecret(consumerSecret)
        .build();
    token = new Token(consumerKey, consumerSecret);
View Full Code Here

    return Index.class;
  }

  // Facebook *************************************
  public Object onSuccessFromFacebookForm() throws MalformedURLException {
    OAuthService service = new ServiceBuilder().provider(FacebookApi.class)
        .apiKey(Constants.APIKEY_FACEBOOK)
        .apiSecret(Constants.APISECRET_FACEBOOK)
        .scope(Constants.SCOPE_FACEBOOK)
        .callback(Constants.CALLBACK_FACEBOOK).build();

View Full Code Here

  // Google *************************************
  @InjectPage
  private Callback callbackGoogle;

  public Object onSuccessFromGoogleForm() throws MalformedURLException {
    OAuthService service = new ServiceBuilder().provider(GoogleApi.class)
        .apiKey(Constants.APIKEY_GOOGLE)
        .apiSecret(Constants.APISECRET_GOOGLE)
        .callback(Constants.CALLBACK_GOOGLE)
        .scope(Constants.SCOPE_GOOGLE).build();

View Full Code Here

    return new URL(request.getHeader("referer"));
  }

  // Facebook *************************************
  public Object onSuccessFromFacebookForm() throws MalformedURLException {
    OAuthService service = new ServiceBuilder().provider(FacebookApi.class)
        .apiKey(Constants.APIKEY_FACEBOOK)
        .apiSecret(Constants.APISECRET_FACEBOOK)
        .scope(Constants.SCOPE_FACEBOOK)
        .callback(Constants.CALLBACK_FACEBOOK).build();

View Full Code Here

  // Google *************************************
  @InjectPage
  private Callback callbackGoogle;

  public Object onSuccessFromGoogleForm() throws MalformedURLException {
    OAuthService service = new ServiceBuilder().provider(GoogleApi.class)
        .apiKey(Constants.APIKEY_GOOGLE)
        .apiSecret(Constants.APISECRET_GOOGLE)
        .callback(Constants.CALLBACK_GOOGLE)
        .scope(Constants.SCOPE_GOOGLE).build();

View Full Code Here

    }
    return null;
  }

  public void readGoogleKey() {
    OAuthService service = new ServiceBuilder().provider(GoogleApi.class)
        .apiKey(Constants.APIKEY_GOOGLE)
        .apiSecret(Constants.APISECRET_GOOGLE)
        .scope(Constants.SCOPE_GOOGLE)
        .callback(Constants.CALLBACK_GOOGLE).build();
View Full Code Here

    }
    return null;
  }

  public void readFacebookKey() {
    OAuthService service = new ServiceBuilder().provider(FacebookApi.class)
        .apiKey(Constants.APIKEY_FACEBOOK)
        .apiSecret(Constants.APISECRET_FACEBOOK)
        .scope(Constants.SCOPE_FACEBOOK)
        .callback(Constants.CALLBACK_FACEBOOK).build();
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.