@Override
    protected String getFinalResponseEventId(final WebApplicationService service, final Response response, final RequestContext requestContext) {
        val httpResponse = WebUtils.getHttpServletResponseFromExternalWebflowContext(requestContext);
        httpResponse.addHeader(CasProtocolConstants.PARAMETER_SERVICE, response.url());
        response.attributes().forEach(httpResponse::addHeader);
        if (response.attributes().containsKey(Response.ResponseType.REDIRECT.name().toLowerCase(Locale.ENGLISH))) {
            return CasWebflowConstants.TRANSITION_ID_REDIRECT;
        }
        return CasWebflowConstants.TRANSITION_ID_SUCCESS;
    }
This is {@link InjectResponseHeadersAction}.

@author Misagh Moayyed
@since 5.2.0
core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/actions/InjectResponseHeadersAction.java