@Override
    protected void finalizeEncode(final RequestAbstractType authnRequest,
                                  final BaseSAML2MessageEncoder e,
                                  final Response samlResponse,
                                  final String relayState,
                                  final MessageContext messageContext) {
        val encoder = (HTTPArtifactEncoder) e;
        encoder.setArtifactMap(this.samlArtifactMap);

        val ctx = getEncoderMessageContext(authnRequest, samlResponse, relayState, messageContext);
        prepareArtifactContext(samlResponse, ctx);
        encoder.setMessageContext(ctx);
        super.finalizeEncode(authnRequest, encoder, samlResponse, relayState, messageContext);
    }
This is {@link SamlResponseArtifactEncoder}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/builders/enc/encoder/sso/SamlResponseArtifactEncoder.java