protected String buildAndEncodeConsentAttributes(final Map<String, List<Object>> attributes) {
        try {
            val json = MAPPER.writer(new MinimalPrettyPrinter()).writeValueAsString(Objects.requireNonNull(attributes));
            LOGGER.trace("Consentable attributes are [{}]", json);
            val base64 = EncodingUtils.encodeBase64(Objects.requireNonNull(json));
            return this.consentCipherExecutor.encode(base64);
        } catch (final Exception e) {
            throw new IllegalArgumentException("Could not serialize attributes for consent decision");
        }
    }
Build consent attribute names string.

@param attributes the attributes
@return the string
support/cas-server-support-consent-core/src/main/java/org/apereo/cas/consent/DefaultConsentDecisionBuilder.java