protected Map<String, List<Object>> getUserInfoFromIndexResult(final ListIndexResponse indexResult) {
        val attachment = indexResult.indexAttachments().stream().findFirst().orElse(null);
        if (attachment == null) {
            LOGGER.warn("Index result has no attachments");
            return null;
        }

        val identifier = attachment.objectIdentifier();
        val listObjectAttributesRequest = getListObjectAttributesRequest(identifier);
        if (listObjectAttributesRequest == null) {
            LOGGER.warn("No object attribute request is available for identifier [{}]", identifier);
            return null;
        }
        val attributesResult = amazonCloudDirectory.listObjectAttributes(listObjectAttributesRequest);
        if (attributesResult == null || !attributesResult.hasAttributes()) {
            LOGGER.warn("No object attribute result is available for identifier [{}] or not attributes are found", identifier);
            return null;
        }

        return attributesResult.attributes()
            .stream()
            .map(a -> {
                var value = (Object) null;
                val attributeValue = a.value();
                LOGGER.debug("Examining attribute [{}]", a);
                if (StringUtils.isNotBlank(attributeValue.numberValue())) {
                    value = attributeValue.numberValue();
                } else if (attributeValue.datetimeValue() != null) {
                    value = DateTimeUtils.zonedDateTimeOf(attributeValue.datetimeValue()).toString();
                } else if (attributeValue.booleanValue() != null) {
                    value = attributeValue.booleanValue().toString();
                } else if (attributeValue.binaryValue() != null) {
                    value = new String(attributeValue.binaryValue().asByteArray(), StandardCharsets.UTF_8);
                } else if (StringUtils.isNotBlank(attributeValue.stringValue())) {
                    value = attributeValue.stringValue();
                }
                return Pair.of(a.key().name(), value);
            })
            .filter(p -> p.getValue() != null)
            .collect(Collectors.toMap(Pair::getKey, pair -> CollectionUtils.toCollection(pair.getValue(), ArrayList.class)));
    }
Gets user info from index result.

@param indexResult the index result
@return the user info from index result
support/cas-server-support-cloud-directory-authentication/src/main/java/org/apereo/cas/clouddirectory/DefaultAmazonCloudDirectoryRepository.java