Package org.pac4j.oauth.profile.vk

Examples of org.pac4j.oauth.profile.vk.VkProfile


    return url;
  }

  @Override
  protected VkProfile extractUserProfile(final String body) {
    final VkProfile profile = new VkProfile();
    JsonNode json = JsonHelper.getFirstNode(body);
    if (json != null) {
      ArrayNode array = (ArrayNode) json.get("response");
      JsonNode userNode = array.get(0);
      profile.setId(JsonHelper.get(userNode, "uid"));
      for (final String attribute : OAuthAttributesDefinitions.vkDefinition.getAllAttributes()) {
        profile.addAttribute(attribute, JsonHelper.get(userNode, attribute));
      }
    }
    return profile;
  }
View Full Code Here

TOP

Related Classes of org.pac4j.oauth.profile.vk.VkProfile

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.