Examples of redirectUrl()


Examples of play.libs.OAuth.redirectUrl()

        final User user = new User();
        user.token = response.token;
        user.secret = response.secret;
        user.save();
        session.put("userId", user.id);
        redirect(twitter.redirectUrl(response.token));
      } else {
              Logger.error("Error contacting twitter: " + response.error);
              login();
          }
     
View Full Code Here

Examples of play.libs.OAuth.redirectUrl()

        if (oauthResponse.error == null) {
            // We received the unauthorized tokens in the OAuth object - store it before we proceed
            user.token = oauthResponse.token;
            user.secret = oauthResponse.secret;
            user.save();
            redirect(twitt.redirectUrl(oauthResponse.token));
        } else {
            Logger.error("Error connecting to twitter: " + oauthResponse.error);
            index();
        }
    }
View Full Code Here

Examples of play.libs.OAuth.redirectUrl()

        OAuth.Response oauthResponse = oauth.retrieveRequestToken();
        if (oauthResponse.error == null) {
            Logger.info("Redirecting to Dropbox for auth.");
            session.put(SessionKeys.TOKEN, oauthResponse.token);
            session.put(SessionKeys.SECRET, oauthResponse.secret);
            redirect(oauth.redirectUrl(oauthResponse.token) +
                    "&oauth_callback=" +
                    URLEncoder.encode(request.getBase() + "/auth-cb", "UTF-8"));
        } else {
            Logger.error("Error connecting to Dropbox: " + oauthResponse.error);
            error("Error connecting to Dropbox.");
View Full Code Here

Examples of play.libs.oauth.OAuth.redirectUrl()

      try {
        final RequestToken response = service
            .retrieveRequestToken(callbackURL);
        // All good, we have the request token
        final String token = response.token;
        final String redirectUrl = service.redirectUrl(token);

        PlayAuthenticate.storeInCache(context.session(), CACHE_TOKEN,
            new SerializableRequestToken(response));
        return redirectUrl;
      } catch (RuntimeException ex) {
View Full Code Here

Examples of yalp.libs.OAuth.redirectUrl()

        if (oauthResponse.error == null) {
            // We received the unauthorized tokens in the OAuth object - store it before we proceed
            user.token = oauthResponse.token;
            user.secret = oauthResponse.secret;
            user.save();
            redirect(twitt.redirectUrl(oauthResponse.token));
        } else {
            Logger.error("Error connecting to twitter: " + oauthResponse.error);
            index();
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.