private static void sanitizeAndTransformAttributeValues(final Map<String, Object> attributes) {
        LOGGER.trace("Sanitizing attribute values in preparation of the final validation response");
        attributes.forEach((key, value) -> {
            val values = CollectionUtils.toCollection(value);
            values.stream()
                .filter(v -> getBinaryAttributeValuePredicate().test(v))
                .forEach(v -> attributes.put(key, transformAttributeValueIfNecessary(v)));
        });
    }
The default implementation of the attribute
encoder that will use a per-service key-pair
to encrypt the credential password and PGT
when available. All other attributes remain in
place.

@author Misagh Moayyed
@since 4.1
core/cas-server-core-services-authentication/src/main/java/org/apereo/cas/authentication/support/DefaultCasProtocolAttributeEncoder.java