JsonNode json = JsonHelper.getFirstNode(body);
if (json != null) {
json = (JsonNode) JsonHelper.get(json, "user");
if (json != null) {
for (final String attribute : OAuthAttributesDefinitions.bitbucketDefinition.getAllAttributes()) {
profile.addAttribute(attribute, JsonHelper.get(json, attribute));
}
}
}
return profile;
}