@JsonIgnore
    @Override
    public List<Object> resolveAttributeValues(final AttributeDefinitionResolutionContext context) throws Throwable {
        List<Object> currentValues = new ArrayList<>(context.getAttributeValues());
        if (StringUtils.isNotBlank(getScript())) {
            currentValues = getScriptedAttributeValue(key, currentValues, context);
        }
        if (getPatterns() != null && !getPatterns().isEmpty() && !currentValues.isEmpty()) {
            currentValues = getPatternValuesFor(currentValues, context);
        }
        if (isScoped()) {
            currentValues = formatValuesWithScope(context.getScope(), currentValues);
        }
        if (StringUtils.isNotBlank(getPatternFormat())) {
            currentValues = formatValuesWithPattern(currentValues);
        }
        if (StringUtils.isNotBlank(getHashingStrategy())) {
            currentValues = hashValues(currentValues);
        }
        
        if (isEncrypted()) {
            currentValues = encryptValues(currentValues, context.getRegisteredService());
        }
        if (StringUtils.isNotBlank(this.canonicalizationMode)) {
            val mode = CaseCanonicalizationMode.valueOf(canonicalizationMode.toUpperCase(Locale.ENGLISH));
            currentValues = Objects.requireNonNull(currentValues)
                .stream()
                .map(value -> mode.canonicalize(value.toString()))
                .collect(Collectors.toList());
        }
        if (StringUtils.isNotBlank(getFlattened()) && currentValues.size() > 1) {
            val flattenedValue = currentValues.stream().map(Object::toString).collect(Collectors.joining(getFlattened()));
            currentValues.clear();
            currentValues.add(flattenedValue);
        }
        LOGGER.trace("Resolved values [{}] for attribute definition [{}]", currentValues, this);
        return currentValues;
    }
This is {@link DefaultAttributeDefinition}.

@author Misagh Moayyed
@author Travis Schmidt
@since 6.2.0
core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/attribute/DefaultAttributeDefinition.java