private SecurityToken fetchSecurityTokenFromAssertion(final TicketValidationResult assertion, final Service targetService) throws Throwable {
        val principal = assertion.getPrincipal().getId();
        val token = getConfigContext().getSecurityTokenServiceTokenFetcher().fetch(targetService, principal);
        if (token.isEmpty()) {
            LOGGER.warn("No security token could be retrieved for service [{}] and principal [{}]", targetService, principal);
            throw UnauthorizedServiceException.denied("Denied: %s".formatted(targetService.getId()));
        }
        return token.get();
    }
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