Package play.libs.oauth.OAuth

Examples of play.libs.oauth.OAuth.OAuthCalculator


  protected TwitterAuthUser transform(final TwitterAuthInfo info)
      throws AuthException {
    final String userInfoUrl = getConfiguration().getString(
        USER_INFO_URL_SETTING_KEY);

    final OAuthCalculator op = getOAuthCalculator(info);

    final JsonNode userJson = signedOauthGet(userInfoUrl, op);

    return new TwitterAuthUser(userJson, info);
  }
View Full Code Here


    final Configuration c = getConfiguration();
    final ConsumerKey cK = new ConsumerKey(
        c.getString(SettingKeys.CONSUMER_KEY),
        c.getString(SettingKeys.CONSUMER_SECRET));

        return new OAuthCalculator(cK, token);
  }
View Full Code Here

    final String userInfoUrl = getConfiguration().getString(
        USER_INFO_URL_SETTING_KEY);
    final String emailUrl = getConfiguration().getString(
        USER_EMAIL_URL_SETTING_KEY);

    final OAuthCalculator op = getOAuthCalculator(info);

    final JsonNode userJson = signedOauthGet(userInfoUrl, op);
    final JsonNode emailJson = signedOauthGet(emailUrl, op);

    return new LinkedinAuthUser(userJson, emailJson.asText(), info);
View Full Code Here

  protected XingAuthUser transform(final XingAuthInfo info)
      throws AuthException {
    final String userInfoUrl = getConfiguration().getString(
        USER_INFO_URL_SETTING_KEY);

    final OAuthCalculator op = getOAuthCalculator(info);

    final JsonNode userJson = signedOauthGet(userInfoUrl, op);

    return new XingAuthUser(userJson.path(NODE_USERS).get(0), info);
  }
View Full Code Here

  public Promise<Result> homeTimeline() {
    Option<RequestToken> sessionTokenPair = getSessionTokenPair();
    if (sessionTokenPair.isDefined()) {
      return ws.url("https://api.twitter.com/1.1/statuses/home_timeline.json")
          .sign(new OAuthCalculator(Twitter.KEY, sessionTokenPair.get()))
          .get()
          .map(new Function<WSResponse, Result>(){
            @Override
            public Result apply(WSResponse result) throws Throwable {
              return ok(result.asJson());
View Full Code Here

TOP

Related Classes of play.libs.oauth.OAuth.OAuthCalculator

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.