src/main/java/org/eurekaclinical/scribeupext/provider/Google2Provider.java
@Override
    protected UserProfile extractUserProfile(final String body) {
        final GoogleProfile profile = new GoogleProfile();
        final JsonNode json = JsonHelper.getFirstNode(body);
        if (json != null) {
            profile.setId(JsonHelper.get(json, "id"));
            profile.addAttribute(EurekaAttributesDefinition.USERNAME, JsonHelper.get(json, Google2AttributesDefinition.EMAIL));
            profile.addAttribute(EurekaAttributesDefinition.FIRSTNAME, JsonHelper.get(json, Google2AttributesDefinition.GIVEN_NAME));
            profile.addAttribute(EurekaAttributesDefinition.LASTNAME, JsonHelper.get(json, Google2AttributesDefinition.FAMILY_NAME));
            profile.addAttribute(EurekaAttributesDefinition.FULLNAME, JsonHelper.get(json, Google2AttributesDefinition.NAME));
            profile.addAttribute(EurekaAttributesDefinition.EMAIL, JsonHelper.get(json, Google2AttributesDefinition.EMAIL));
        }
        return profile;
    }
@Override
    protected UserProfile extractUserProfile(final String body) {
        final GoogleProfile profile = new GoogleProfile();
        final JsonNode json = JsonHelper.getFirstNode(body);
        if (json != null) {
            profile.setId(JsonHelper.get(json, "id"));
            profile.addAttribute(EurekaAttributesDefinition.USERNAME, JsonHelper.get(json, Google2AttributesDefinition.EMAIL));
            profile.addAttribute(EurekaAttributesDefinition.FIRSTNAME, JsonHelper.get(json, Google2AttributesDefinition.GIVEN_NAME));
            profile.addAttribute(EurekaAttributesDefinition.LASTNAME, JsonHelper.get(json, Google2AttributesDefinition.FAMILY_NAME));
            profile.addAttribute(EurekaAttributesDefinition.FULLNAME, JsonHelper.get(json, Google2AttributesDefinition.NAME));
            profile.addAttribute(EurekaAttributesDefinition.EMAIL, JsonHelper.get(json, Google2AttributesDefinition.EMAIL));
        }
        return profile;
    }
@ Override protected UserProfile extractUserProfile ( final String body ) { final GoogleProfile profile = new GoogleProfile ( ) ; final JsonNode json = JsonHelper . getFirstNode ( body ) ; if ( json != null ) { profile . setId ( JsonHelper . get ( json , "id" ) ) ; profile . addAttribute ( EurekaAttributesDefinition . USERNAME , JsonHelper . get ( json , Google2AttributesDefinition . EMAIL ) ) ; profile . addAttribute ( EurekaAttributesDefinition . FIRSTNAME , JsonHelper . get ( json , Google2AttributesDefinition . GIVEN_NAME ) ) ; profile . addAttribute ( EurekaAttributesDefinition . LASTNAME , JsonHelper . get ( json , Google2AttributesDefinition . FAMILY_NAME ) ) ; profile . addAttribute ( EurekaAttributesDefinition . FULLNAME , JsonHelper . get ( json , Google2AttributesDefinition . NAME ) ) ; profile . addAttribute ( EurekaAttributesDefinition . EMAIL , JsonHelper . get ( json , Google2AttributesDefinition . EMAIL ) ) ; } return profile ; }
Returns the user's profile using the attributes that Eureka! Clinical
expects.

@param body the JSON response from the user profile request.

@return the user's profile.
Returns the user s profile using the attributes that Eureka! Clinical expects .