public Map<String, List<Object>> retrieve() {
        val query = new LinkedHashMap<String, Object>();
        if (currentPrincipal != null) {
            query.put("principal", currentPrincipal.getId());
            query.putAll(currentPrincipal.getAttributes());
        }
        query.putAll(queryAttributes);
        query.put("username", principalId.trim());

        if (service != null) {
            query.put("service", service.getId());
        }

        LOGGER.debug("Fetching person attributes for query [{}]", query);
        val people = attributeRepository.getPeople(query, PrincipalAttributeRepositoryFilter.of(this));
        if (people == null || people.isEmpty()) {
            LOGGER.warn("No person records were fetched from attribute repositories for [{}]", query);
            return new HashMap<>();
        }

        if (people.size() > 1) {
            LOGGER.warn("Multiple records were found for [{}] from attribute repositories for query [{}]. The records are [{}], "
                + "and CAS will only pick the first person record from the results.", principalId, query, people);
        }

        val person = people.iterator().next();
        LOGGER.debug("Retrieved person [{}] from attribute repositories for query [{}]", person, query);
        return person.getAttributes();
    }
Retrieve person attributes.

@return the map
core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/attribute/PrincipalAttributeRepositoryFetcher.java