Package models.auth

Examples of models.auth.GoogleOAuthAccount


        Member member = createMember("member");
        // 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
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));

        GoogleOAuthAccount account = new GoogleOAuthAccount(token, secret);
        account.googleId = JSON.getStringProperty(object, "id");
        account.email = JSON.getStringProperty(object, "email");
        account.name = JSON.getStringProperty(object, "name");
        account.givenName = JSON.getStringProperty(object, "given_name");
        account.familyName = JSON.getStringProperty(object, "family_name");
View Full Code Here

TOP

Related Classes of models.auth.GoogleOAuthAccount

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.