private List<Map<String, String>> mapSyncopeGroupMemberships(final JsonNode user) {
        val memberships = new ArrayList<Map<String, String>>();
        user.get("memberships").forEach(member -> {
            val membershipInfo = new HashMap<String, String>();
            membershipInfo.put("groupName", member.get("groupName").asText());
            if (member.has("plainAttrs")) {
                member.get("plainAttrs").forEach(attr ->
                    membershipInfo.put(attr.get("schema").asText(), attr.get("values").toString())
                );
                memberships.add(membershipInfo);
            }
        });
        return memberships;
    }
Convert user as a JSON node into a map of details.

@param user              the user
@param attributeMappings the attribute mappings
@return the map
support/cas-server-support-syncope-authentication/src/main/java/org/apereo/cas/syncope/SyncopeUtils.java