@PostMapping(path = SamlIdPConstants.ENDPOINT_SAML1_SOAP_ARTIFACT_RESOLUTION)
    @Operation(summary = "Handle SAML1 SOAP Artifact Resolution Request")
    protected void handlePostRequest(final HttpServletResponse response,
                                     final HttpServletRequest request) throws Throwable {
        val ctx = decodeSoapRequest(request);
        val artifactMsg = (ArtifactResolve) ctx.getMessage();
        try {
            val issuer = Objects.requireNonNull(artifactMsg).getIssuer().getValue();
            val registeredService = verifySamlRegisteredService(issuer, request);
            val adaptor = getSamlMetadataFacadeFor(registeredService, artifactMsg);
            if (adaptor.isEmpty()) {
                throw UnauthorizedServiceException.denied("Cannot find metadata linked to %s".formatted(issuer));
            }
            val facade = adaptor.get();
            verifyAuthenticationContextSignature(ctx, request, artifactMsg, facade, registeredService);
            val artifactId = artifactMsg.getArtifact().getValue();

            val factory = (SamlArtifactTicketFactory) getConfigurationContext().getTicketFactory().get(SamlArtifactTicket.class);
            val ticketId = factory.createTicketIdFor(artifactId);
            val ticket = getConfigurationContext().getTicketRegistry().getTicket(ticketId, SamlArtifactTicket.class);
            if (ticket == null) {
                throw new InvalidTicketException(ticketId);
            }
            val issuerService = getConfigurationContext().getWebApplicationServiceFactory().createService(issuer);
            val authentication = ((AuthenticationAwareTicket) ticket.getTicketGrantingTicket()).getAuthentication();
            val casAssertion = buildCasAssertion(authentication,
                issuerService, registeredService,
                CollectionUtils.wrap("artifact", ticket));

            val buildContext = SamlProfileBuilderContext.builder()
                .samlRequest(artifactMsg)
                .httpRequest(request)
                .httpResponse(response)
                .authenticatedAssertion(Optional.of(casAssertion))
                .registeredService(registeredService)
                .adaptor(facade)
                .binding(SAMLConstants.SAML2_ARTIFACT_BINDING_URI)
                .messageContext(ctx)
                .build();
            getConfigurationContext().getResponseBuilder().build(buildContext);
        } catch (final Exception e) {
            LoggingUtils.error(LOGGER, e);
            request.setAttribute(SamlIdPConstants.REQUEST_ATTRIBUTE_ERROR,
                "Unable to build SOAP response: " + StringUtils.defaultString(e.getMessage()));

            val buildContext = SamlProfileBuilderContext.builder()
                .samlRequest(artifactMsg)
                .httpRequest(request)
                .httpResponse(response)
                .binding(SAMLConstants.SAML2_ARTIFACT_BINDING_URI)
                .messageContext(ctx)
                .build();
            getConfigurationContext().getSamlFaultResponseBuilder().build(buildContext);
        }
    }
Handle post request.

@param response the response
@param request  the request
@throws Throwable the throwable
support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/artifact/SamlIdPSaml1ArtifactResolutionProfileHandlerController.java