Package org.pac4j.oauth.profile.linkedin2

Examples of org.pac4j.oauth.profile.linkedin2.LinkedIn2Profile.addAttribute()


    @Override
    protected LinkedIn2Profile extractUserProfile(final String body) {
        LinkedIn2Profile profile = new LinkedIn2Profile();
        profile.setId(XmlHelper.get(body, "id"));
        for (final String attribute : OAuthAttributesDefinitions.linkedin2Definition.getPrincipalAttributes()) {
            profile.addAttribute(attribute, XmlHelper.get(body, attribute));
        }
        String url = XmlHelper.get(XmlHelper.get(body, LinkedIn2AttributesDefinition.SITE_STANDARD_PROFILE_REQUEST),
                                   "url");
        profile.addAttribute(LinkedIn2AttributesDefinition.SITE_STANDARD_PROFILE_REQUEST, url);
        return profile;
View Full Code Here


        for (final String attribute : OAuthAttributesDefinitions.linkedin2Definition.getPrincipalAttributes()) {
            profile.addAttribute(attribute, XmlHelper.get(body, attribute));
        }
        String url = XmlHelper.get(XmlHelper.get(body, LinkedIn2AttributesDefinition.SITE_STANDARD_PROFILE_REQUEST),
                                   "url");
        profile.addAttribute(LinkedIn2AttributesDefinition.SITE_STANDARD_PROFILE_REQUEST, url);
        return profile;
    }
   
    public String getScope() {
        return this.scope;
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.