protected List<String> defineAttributesToRead() {
        List<String> names = new ArrayList<>();
        names.add(getIdAttribute());
        names.add(LINKEDID);
        // legacy mode: 'getIdAttribute()' + linkedid + username + attributes
        if (isLegacyMode()) {
            names.add(getUsernameAttribute());
            names.addAll(Arrays.asList(attributeNames));
        } else {
            // new beahviour (>= v2.0): 'getIdAttribute()' + linkedid + serializedprofile
            names.add(SERIALIZED_PROFILE);
        }
        return names;
    }
Define the attributes to read in the storage.

@return the attributes
pac4j-core/src/main/java/org/pac4j/core/profile/service/AbstractProfileService.java