private void addSecurityTokenTicketToRegistry(final HttpServletRequest request,
                                                  final SecurityToken securityToken) throws Throwable {
        LOGGER.trace("Creating security token as a ticket to CAS ticket registry...");
        val ticketRegistry = getConfigContext().getTicketRegistry();
        val tgt = CookieUtils.getTicketGrantingTicketFromRequest(getConfigContext().getTicketGrantingTicketCookieGenerator(),
            ticketRegistry, request);
        val serializedToken = SerializationUtils.serialize(securityToken);

        val securityTokenTicketFactory = (SecurityTokenTicketFactory) getConfigContext().getTicketFactory().get(SecurityTokenTicket.class);
        val ticket = securityTokenTicketFactory.create(tgt, serializedToken);
        LOGGER.trace("Created security token ticket [{}]", ticket);
        ticketRegistry.addTicket(ticket);
        LOGGER.trace("Added security token as a ticket to CAS ticket registry...");
        ticketRegistry.updateTicket(tgt);
    }
Handle federation request.

@param response the response
@param request  the request
@return the model and view
@throws Throwable the throwable
support/cas-server-support-ws-idp/src/main/java/org/apereo/cas/ws/idp/web/WSFederationValidateRequestCallbackController.java