protected void createSamlLogoutRequestCookie(final HttpServletRequest request, final HttpServletResponse response,
                                                 final LogoutRequest logoutRequest, final MessageContext messageContext) throws Exception {
        val relayState = StringUtils.defaultString(SAMLBindingSupport.getRelayState(messageContext));
        val issuer = SamlIdPUtils.getIssuerFromSamlObject(logoutRequest);
        val sloRequest = StringUtils.defaultString(WebUtils.getSingleLogoutRequest(request));
        val payload = new HashMap<String, Object>();
        payload.put(SamlProtocolConstants.PARAMETER_ENTITY_ID, issuer);
        FunctionUtils.doIfNotBlank(relayState, value -> payload.put(SamlProtocolConstants.PARAMETER_SAML_RELAY_STATE, value));
        FunctionUtils.doIfNotBlank(relayState, value -> payload.put(SamlProtocolConstants.PARAMETER_SAML_REQUEST, sloRequest));
        val cookieValue = EncodingUtils.encodeBase64(MAPPER.writeValueAsString(payload).getBytes(StandardCharsets.UTF_8));
        delegatedSaml2IdPSloRequestCookieGenerator.addCookie(request, response, cookieValue);
    }
This is {@link DelegatedAuthenticationSamlIdPSingleLogoutRequestProcessor}.

@author Misagh Moayyed
@since 7.3.0
support/cas-server-support-pac4j-saml/src/main/java/org/apereo/cas/web/saml2/DelegatedAuthenticationSamlIdPSingleLogoutRequestProcessor.java