Package models.auth

Examples of models.auth.TwitterOAuthAccount


        // Some accounts
        member.addAccount(new GoogleAccount("1234"));
        member.addAccount(new TwitterAccount("member"));
        member.authenticate(new LinkItAccount("password"));
        member.authenticate(new GoogleOAuthAccount("token", "secret"));
        member.authenticate(new TwitterOAuthAccount("token", "secret"));
        // Some shared links
        member.addSharedLink(new SharedLink("Google", "http://www.google.com"));
        member.addSharedLink(new SharedLink("Yahoo", "http://www.yahoo.fr"));
        // Add some activities
        member.updateProfile(true);
View Full Code Here


    }
   
    // Test for BUG https://trello.com/card/crash-signup/4f1b9ce056cf07e52f0072f7/64
    @Test public void removeAccountDuringSignup() {
        final Member m = new Member("toto");
        final TwitterOAuthAccount authAccount = new TwitterOAuthAccount("", "");
        authAccount.screenName = "toto";
        m.preregister(authAccount);
        m.removeAccount(m.getTwitterAccount());
        m.register();
    }
View Full Code Here

    public OAuthAccount getUserAccount(String token, String secret) {

        final String url = getConfigString("userProfileJsonUrl");
        final JsonObject object = JSON.getAsObject(get(url, token, secret));

        TwitterOAuthAccount account = new TwitterOAuthAccount(token, secret);
        account.screenName = JSON.getStringProperty(object, "screen_name");
        account.userId = JSON.getLongProperty(object, "id");
        account.lang = JSON.getStringProperty(object, "lang");
        account.name = JSON.getStringProperty(object, "name");
        account.location = JSON.getStringProperty(object, "location");
View Full Code Here

TOP

Related Classes of models.auth.TwitterOAuthAccount

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.