protected <T extends SAMLObject> void prepareOutboundContext(
        final T samlObject,
        final SamlRegisteredServiceMetadataAdaptor adaptor,
        final MessageContext outboundContext,
        final String binding,
        final RequestAbstractType authnRequest) throws SamlException {

        LOGGER.trace("Outbound saml object to use is [{}]", samlObject.getClass().getName());
        outboundContext.setMessage(samlObject);
        SamlIdPUtils.preparePeerEntitySamlEndpointContext(Pair.of(authnRequest, outboundContext), outboundContext, adaptor, binding);
    }
Prepare outbound context.

@param <T>             the type parameter
@param samlObject      the saml object
@param adaptor         the adaptor
@param outboundContext the outbound context
@param binding         the binding
@param authnRequest    the authn request
@throws SamlException the saml exception
support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/builders/enc/DefaultSamlIdPObjectSigner.java