protected void customizeAuthnContextClass(final IndirectClient client, final WebContext webContext,
                                              final AuthnRequest authnRequest) {

        val requestedAuthnContext = authnRequest.getRequestedAuthnContext();
        if (requestedAuthnContext != null && requestedAuthnContext.getAuthnContextClassRefs() != null
            && !requestedAuthnContext.getAuthnContextClassRefs().isEmpty()) {
            val authnContextClassRefs = requestedAuthnContext.getAuthnContextClassRefs()
                .stream()
                .map(XSURI::getURI)
                .toList();

            val definedContexts = CollectionUtils.convertDirectedListToMap(
                casProperties.getAuthn().getSamlIdp().getCore().getContext().getAuthenticationContextClassMappings());
            LOGGER.debug("Defined authentication context mappings are [{}]", definedContexts);
            val mappedMethods = authnContextClassRefs.stream()
                .map(ref -> definedContexts.getOrDefault(ref, ref))
                .map(ref -> new ArrayList<>(StringUtils.commaDelimitedListToSet(ref)))
                .flatMap(List::stream)
                .toList();
            LOGGER.debug("Mapped authentication context classes are [{}]", mappedMethods);
            webContext.setRequestAttribute(SAML2ConfigurationContext.REQUEST_ATTR_AUTHN_CONTEXT_CLASS_REFS, mappedMethods);
            val comparison = Optional.ofNullable(requestedAuthnContext.getComparison()).orElse(AuthnContextComparisonTypeEnumeration.EXACT);
            webContext.setRequestAttribute(SAML2ConfigurationContext.REQUEST_ATTR_COMPARISON_TYPE, comparison.name());
        }
    }
This is {@link SamlIdPDelegatedClientAuthenticationRequestCustomizer}.

@author Misagh Moayyed
@since 6.4.0
support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/delegation/SamlIdPDelegatedClientAuthenticationRequestCustomizer.java