@Override
    protected Map<String, List<Object>> getAttributesForSamlRegisteredService(
        final Map<String, List<Object>> attributes,
        final SamlRegisteredServiceCachingMetadataResolver resolver,
        final SamlRegisteredServiceMetadataAdaptor facade,
        final EntityDescriptor entityDescriptor,
        final RegisteredServiceAttributeReleasePolicyContext context) {

        val releaseAttributes = new HashMap<String, List<Object>>();
        getSamlAuthnRequest(context)
            .filter(authnRequest -> authnRequest.getScoping() != null)
            .filter(authnRequest -> !authnRequest.getScoping().getRequesterIDs().isEmpty())
            .ifPresent(authnRequest -> {
                val requesterIds = authnRequest.getScoping().getRequesterIDs();
                val matched = requesterIds
                    .stream()
                    .anyMatch(requesterId -> RegexUtils.find(this.requesterIdPattern, requesterId.getURI()));
                if (matched) {
                    releaseAttributes.putAll(attributes);
                }
            });
        return authorizeReleaseOfAllowedAttributes(context, releaseAttributes);

    }
This is {@link AuthnRequestRequesterIdAttributeReleasePolicy}.

@author Misagh Moayyed
@since 7.1.0
support/cas-server-support-saml-idp-core/src/main/java/org/apereo/cas/support/saml/services/AuthnRequestRequesterIdAttributeReleasePolicy.java