Package org.pac4j.oauth.profile.foursquare

Examples of org.pac4j.oauth.profile.foursquare.FoursquareProfile


                this.proxyHost,
                this.proxyPort);
    }

    protected FoursquareProfile extractUserProfile(String body) {
        FoursquareProfile profile = new FoursquareProfile();
        JsonNode json = JsonHelper.getFirstNode(body);
        if (json == null) {
            return profile;
        }
        JsonNode response = (JsonNode) JsonHelper.get(json, "response");
        if (response == null) {
            return profile;
        }
        JsonNode user = (JsonNode) JsonHelper.get(response, "user");
        if (user != null) {
            profile.setId(JsonHelper.get(user, "id"));

            for (final String attribute : OAuthAttributesDefinitions.foursquareDefinition.getAllAttributes()) {
                profile.addAttribute(attribute, JsonHelper.get(user, attribute));
            }
        }
        return profile;
    }
View Full Code Here

TOP

Related Classes of org.pac4j.oauth.profile.foursquare.FoursquareProfile

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.