@Override
    public void put(
        @Nonnull final String artifact,
        @Nonnull final String relyingPartyId,
        @Nonnull final String issuerId,
        @Nonnull final SAMLObject samlMessage) throws IOException {
        super.put(artifact, relyingPartyId, issuerId, samlMessage);

        val request = HttpRequestUtils.getHttpServletRequestFromRequestAttributes();
        val response = HttpRequestUtils.getHttpServletResponseFromRequestAttributes();
        var ticketGrantingTicket = CookieUtils.getTicketGrantingTicketFromRequest(
            ticketGrantingTicketCookieGenerator, ticketRegistry, request);
        if (ticketGrantingTicket == null) {
            val ctx = new JEEContext(request, response);
            val manager = new ProfileManager(ctx, samlIdPDistributedSessionStore);
            ticketGrantingTicket = manager.getProfile()
                .map(profile -> profile.getAttribute(TicketGrantingTicket.class.getName()))
                .map(ticketId -> ticketRegistry.getTicket(ticketId.toString(), TicketGrantingTicket.class))
                .orElse(null);
        }

        val samlArtifactTicketFactory = (SamlArtifactTicketFactory) ticketFactory.get(SamlArtifactTicket.class);
        val ticket = samlArtifactTicketFactory.create(artifact,
            Objects.requireNonNull(ticketGrantingTicket).getAuthentication(),
            ticketGrantingTicket,
            issuerId,
            relyingPartyId, samlMessage);
        FunctionUtils.doUnchecked(__ -> ticketRegistry.addTicket(ticket));
    }
This is {@link CasSamlArtifactMap}.

@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/artifact/CasSamlArtifactMap.java