@Override
    public Map<String, List<Object>> resolveAttributeValues(final Collection<String> attributeDefinitions,
                                                            final Map<String, List<Object>> availableAttributes,
                                                            final Principal principal,
                                                            final RegisteredService registeredService,
                                                            final Service service) {
        val finalAttributes = new LinkedHashMap<String, List<Object>>(attributeDefinitions.size());
        attributeDefinitions.forEach(entry -> locateAttributeDefinition(entry).ifPresentOrElse(definition -> {
            val attributeValues = determineValuesForAttributeDefinition(availableAttributes, entry, definition);
            LOGGER.trace("Resolving attribute [{}] from attribute definition store with values [{}]", entry, attributeValues);
            val attributeDefinitionResolutionContext = AttributeDefinitionResolutionContext.builder()
                .attributeValues(attributeValues)
                .principal(principal)
                .registeredService(registeredService)
                .service(service)
                .attributes(availableAttributes)
                .scope(this.scope)
                .build();
            val result = resolveAttributeValues(entry, attributeDefinitionResolutionContext);
            if (result.isPresent()) {
                val resolvedValues = result.get().getValue();
                if (resolvedValues.isEmpty()) {
                    LOGGER.debug("Unable to produce or determine attributes values for attribute definition [{}]", definition);
                } else {
                    LOGGER.trace("Resolving attribute [{}] based on attribute definition [{}]", entry, definition);
                    val attributeKeys = org.springframework.util.StringUtils.commaDelimitedListToSet(
                        StringUtils.defaultIfBlank(definition.getName(), entry));

                    attributeKeys.forEach(key -> {
                        LOGGER.trace("Determined attribute name to be [{}] with values [{}]", key, resolvedValues);
                        finalAttributes.put(key, resolvedValues);
                    });
                }
            }
        }, () -> {
            if (availableAttributes.containsKey(entry)) {
                LOGGER.trace("Using already-resolved attribute name/value, as no attribute definition was found for [{}]", entry);
                finalAttributes.put(entry, availableAttributes.get(entry));
            }
        }));
        LOGGER.trace("Final collection of attributes resolved from attribute definition store is [{}]", finalAttributes);
        return finalAttributes;
    }
Register attribute definitions.

@param entries the entries
core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/attribute/DefaultAttributeDefinitionStore.java