Package play.libs

Examples of play.libs.OAuth.retrieveRequestToken()


    // first time the request comes here
    // the user has just pushed the "sign in with twitter button"
    if (!OAuth.isVerifierResponse()) {
      final OAuth twitter = OAuth.service(TWITTER);
      final OAuth.Response response = twitter.retrieveRequestToken();
      if (response.error==null) {
        final User user = new User();
        user.token = response.token;
        user.secret = response.secret;
        user.save();
View Full Code Here


                Logger.error("Error connecting to twitter: " + oauthResponse.error);
            }
            index();
        }
        OAuth twitt = OAuth.service(TWITTER);
        OAuth.Response oauthResponse = twitt.retrieveRequestToken();
        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();
View Full Code Here

    public static void auth() throws Exception {
        flash.keep(REDIRECT_URL);
        ServiceInfo serviceInfo = Dropbox.OAUTH;
        OAuth oauth = OAuth.service(serviceInfo);
        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) +
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.