@Override
    public RegisteredServiceConsentPolicy getConsentPolicy() {
        val chainingConsentPolicy = new ChainingRegisteredServiceConsentPolicy();
        val newConsentPolicies = policies
            .stream()
            .filter(Objects::nonNull)
            .map(policy -> policy.getConsentPolicy().getPolicies())
            .flatMap(List::stream)
            .sorted(AnnotationAwareOrderComparator.INSTANCE)
            .collect(Collectors.toCollection(LinkedHashSet::new));
        chainingConsentPolicy.addPolicies(newConsentPolicies);
        return chainingConsentPolicy;
    }
This is {@link ChainingAttributeReleasePolicy}.

@author Misagh Moayyed
@since 5.1.0
core/cas-server-core-authentication-attributes/src/main/java/org/apereo/cas/services/ChainingAttributeReleasePolicy.java